# usage
source ./parseargs.sh
export -f parseargs
IFS=$'\r\n' GLOBIGNORE='*' args=($(parseargs "foo 'bar baz' qux *"))
echo '$@': "${args[@]}"
for arg in "${args[@]}"; do
echo "$arg"
done