You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
8 lines
218 B
8 lines
218 B
# usage
|
|
source ./parseargs.sh
|
|
MY_ARGS="foo 'bar baz' qux * "'$(dangerous)'" sudo ls -lah"
|
|
IFS=$'\r\n' GLOBIGNORE='*' args=($(parseargs "$MY_ARGS"))
|
|
echo '$@': "${args[@]}"
|
|
for arg in "${args[@]}"; do
|
|
echo "$arg"
|
|
done
|
|
|