1 |
On Saturday 31 December 2005 22:47, Alexander Skwar wrote: |
2 |
> Francesco Talamona schrieb: |
3 |
> > On Saturday 31 December 2005 22:04, Francesco Talamona wrote: |
4 |
> >> $ for f in $"`ls *.jpg`"; do echo $f; done |
5 |
> >> foo bar.jpg |
6 |
> > |
7 |
> > Little typo, I made an hybrid :-) |
8 |
> > |
9 |
> > [sko@aemaeth:~]$ for f in "$(ls *.jpg)"; do echo $f; done |
10 |
> > foo bar.jpg |
11 |
> > [sko@aemaeth:~]$ for f in "`ls *.jpg`"; do echo $f; done |
12 |
> > foo bar.jpg |
13 |
> |
14 |
> Still wrong. Still just one line of output. Cause of |
15 |
> error: The use of " in the "for" loop. |
16 |
> |
17 |
> Further: No need to use ls. |
18 |
|
19 |
You are right! I tested in a folder containing just "foo bar.jpg" |
20 |
Of course a one-line output defeats the usefulness of "for" cycle :-) |
21 |
|
22 |
cheers |
23 |
Francesco |
24 |
|
25 |
-- |
26 |
Linux Version 2.6.14-gentoo-r6, Compiled #0 PREEMPT Sat Dec 31 01:17:32 |
27 |
CET 2005 |
28 |
One 2.2GHz AMD Athlon 64 Processor, 2GB RAM, 4415.90 Bogomips Total |
29 |
aemaeth |
30 |
-- |
31 |
gentoo-user@g.o mailing list |