|
From: | Marc Herbert |
Subject: | Re: Selecting out of an array |
Date: | Tue, 26 Jan 2010 10:15:42 +0000 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090825) |
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 "${ARRAY[@]}"; do echo "file: $f"; done ARRAY=( * ) # OK for f in "${ARRAY[@]}"; do echo "file: $f"; done
[Prev in Thread] | Current Thread | [Next in Thread] |