How can you do an array literal? I tried:
for x in (635 35710 653 30420 29835 35004)
echo $x
end
It's much simpler than you tried: for x in 635 35710 653
will work.
Think of for
as another command that receives arguments, and arrays always expand each element to one argument - so just passing it like that will have the same effect as a (theoretical) more specialized array literal would.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With