[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Spaces in File name Handling
From: |
Paul Jarc |
Subject: |
Re: Spaces in File name Handling |
Date: |
Sun, 14 Mar 2004 00:05:26 -0500 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux) |
alupu@att.net wrote:
> Does this go all the way back to the old "Doug McIlroy" philosophy
> on echo described in "The Unix Programming Environment" - Using the
> Shell, by BWK and RP?
I'm not familiar with it. Got a URL?
> It appears that if I _quote_ the argument to echo, the shell will
> finally behave as expected (by the uninitiated) and echo will show the
> naked truth (splits and all).
I think we're not using the word "split" the same way. When I say
"split", I'm talking about the action performed by the shell to turn
one value (like an unquoted $TMP) into (maybe just one, or maybe
multiple) words. You seem to think of the word "split" as referring
to a kind of character - those in $IFS, I guess.
So yes, if you run:
$ echo "$TMP"
Then echo's output will include any $IFS characters that happen to be
in $TMP. But to describe this in terms of "splits", I would say there
there are no splits - i.e., the shell is not doing any splitting. The
$TMP value remains whole (unsplit).
> Had I known that (or seen it mentioned somewhere) I _may_ have had
> the chance to figure out the $IFS business on my own
It's in the man page. Look for the "Word Splitting" heading.
paul