2 ms·
Bash has arrays: var=( a b "c d" ) ls "${var[@]}" POSIX shell can get you what you want with eval: var='a b "c d"' eval "ls $var" There is a
by account42 6y ago
Bash has arrays:
var=( a b "c d" )
ls "${var[@]}"
POSIX shell can get you what you want with eval:
var='a b "c d"'
eval "ls $var"
There is also one array variable in POSIX shells, the argument list:
set -- a b "c d"
ls "$@"