[Nolug] spaces in environment variables conflicting with "echo"

From: Ron Johnson <ron.l.johnson_at_cox.net>
Date: 14 Apr 2003 14:22:15 -0500
Message-Id: <1050348135.3489.17.camel@haggis>

Hi,

This is a common newbie problem, but I don't know quite how to
frame a google search...

$ ls -1 |grep ' '
foo bar
foo snafu
$
$ for f in `ls -1 |grep ' '`;
> do
> echo "$f";
> done
foo
bar
foo
snafu

Naturally, I don't want that!!! What's the magical sequence of
characters to get it to print out the complete file names?

Thanks

-- 
+-----------------------------------------------------------+
| Ron Johnson, Jr.     Home: ron.l.johnson@cox.net          |
| Jefferson, LA  USA   http://members.cox.net/ron.l.johnson |
|                                                           |
| An ad currently being run by the NEA (the US's biggest    |
| public school TEACHERS UNION) asks a teenager if he can   |
| find sodium and *chloride* in the periodic table of the   |
| elements.                                                 |
| And they wonder why people think public schools suck...   |
+-----------------------------------------------------------+
___________________
Nolug mailing list
nolug@nolug.org
Received on 04/14/03

This archive was generated by hypermail 2.2.0 : 12/19/08 EST