1 |
On Sat, 31 Dec 2005 20:38:32 +0100, Matthias Bethke wrote: |
2 |
|
3 |
> | $ ls *.jpg | while read f; do echo "$f"; done |
4 |
> | foo bar.jpg |
5 |
> The quotes are useless for "echo" here, but for other commands you'll |
6 |
> usually need them to keep the command form taking filenames with sapaces |
7 |
> as separate arguments. |
8 |
|
9 |
The quotes are only unnecessary for echo if filenames only contain single |
10 |
spaces, multiple consecutive spaces will be converted to a single space |
11 |
if not quoted. |
12 |
|
13 |
$ echo "Hello there" |
14 |
Hello there |
15 |
$ echo Hello there |
16 |
Hello there |
17 |
|
18 |
|
19 |
-- |
20 |
Neil Bothwick |
21 |
|
22 |
Never get into fights with ugly people because they have nothing to lose. |