Marc Herbert-5 wrote:
> 
> DennisW a écrit :
>>  Also, don't use ls like this - it's eyes-only.
> 
> Here is a demonstration:
> 
> touch "filename with spaces"
> ARRAY=( $(ls) )  # BUG
> for f in "${arr...@]}"; do echo "file: $f"; done
> ARRAY=( * )      # OK
> for f in "${arr...@]}"; do echo "file: $f"; done
> 
> 

This is gold Marc! This answers and solves another issue I was having, as
I'm sure you can surmise. :)

Jon
-- 
View this message in context: 
http://old.nabble.com/Selecting-out-of-an-array-tp27316649p27350192.html
Sent from the Gnu - Bash mailing list archive at Nabble.com.



Reply via email to