On Saturday 31 December 2005 22:47, Alexander Skwar wrote: > Francesco Talamona schrieb: > > On Saturday 31 December 2005 22:04, Francesco Talamona wrote: > >> $ for f in $"`ls *.jpg`"; do echo $f; done > >> foo bar.jpg > > > > Little typo, I made an hybrid :-) > > > > [EMAIL PROTECTED]:~]$ for f in "$(ls *.jpg)"; do echo $f; done > > foo bar.jpg > > [EMAIL PROTECTED]:~]$ for f in "`ls *.jpg`"; do echo $f; done > > foo bar.jpg > > Still wrong. Still just one line of output. Cause of > error: The use of " in the "for" loop. > > Further: No need to use ls.
You are right! I tested in a folder containing just "foo bar.jpg" Of course a one-line output defeats the usefulness of "for" cycle :-) cheers Francesco -- Linux Version 2.6.14-gentoo-r6, Compiled #0 PREEMPT Sat Dec 31 01:17:32 CET 2005 One 2.2GHz AMD Athlon 64 Processor, 2GB RAM, 4415.90 Bogomips Total aemaeth -- gentoo-user@gentoo.org mailing list