Gentoo Archives: gentoo-user

From: Neil Bothwick <neil@××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [OT] Filename modification with suffix
Date: Sat, 31 Dec 2005 22:30:45
Message-Id: 20051231221949.6b87f92d@krikkit.digimed.co.uk
In Reply to: Re: [gentoo-user] [OT] Filename modification with suffix by Matthias Bethke
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.

Attachments

File name MIME type
signature.asc application/pgp-signature