minus-squareshmanio@lemmy.worldtoLinux@lemmy.ml•Ash Vs BashlinkfedilinkEnglisharrow-up1·edit-27 months agoYou should put some quotes where you use the array: not_what_you_think=( "a b" "c" "d" ) for sneaky in "${not_what_you_think[@]}"; do echo "This is sneaky: ${sneaky}" done This is sneaky: a b This is sneaky: c This is sneaky: d linkfedilink
You should put some quotes where you use the array:
not_what_you_think=( "a b" "c" "d" ) for sneaky in "${not_what_you_think[@]}"; do echo "This is sneaky: ${sneaky}" done This is sneaky: a b This is sneaky: c This is sneaky: d