On Thu, 27 May, 2010 at 03:11:18 -0500, David C. Rankin wrote:
On 05/26/2010 02:05 AM, Jon Clausen wrote:
Haven't tested it, but I'm pretty sure files with whitespace will break this, but you get the idea
That's what IFS=$'\n' is for :p
Indeed... however: Now I *have* tested, and somewhat surprisingly (to me at least) filenames with whitespace are not a problem: jon@nx8220:~/tmp/test> ll total 0 -rw-r--r-- 1 jon users 0 2010-05-27 11:39 file no1 -rw-r--r-- 1 jon users 0 2010-05-27 11:39 file no2 drwxr-xr-x 3 jon users 17 2010-04-21 09:32 Folder1 jon@nx8220:~/tmp/test> array=(*) jon@nx8220:~/tmp/test> echo ${array[@]} file no1 file no2 Folder1 jon@nx8220:~/tmp/test> echo ${#array[@]} 3 jon@nx8220:~/tmp/test> echo ${array[0]} file no1 jon@nx8220:~/tmp/test> echo ${#array[0]} 8 so there :) /jon -- YMMV -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org