update comments and vars

This commit is contained in:
AJ ONeal 2019-06-02 03:18:03 -06:00
parent 0a52353444
commit 35429455ee
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# usage # usage
source ./parseargs.sh source ./parseargs.sh
export -f parseargs MY_ARGS="foo 'bar baz' qux * "'$(dangerous)'" sudo ls -lah"
IFS=$'\r\n' GLOBIGNORE='*' args=($(parseargs "foo 'bar baz' qux *")) IFS=$'\r\n' GLOBIGNORE='*' args=($(parseargs "$MY_ARGS"))
echo '$@': "${args[@]}" echo '$@': "${args[@]}"
for arg in "${args[@]}"; do for arg in "${args[@]}"; do
echo "$arg" echo "$arg"