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

From: Yuji Yamano <yyamano_at_kt.rim.or.jp>
Date: Tue, 15 Apr 2003 07:12:01 +0900 (JST)
Message-Id: <20030415.071201.62350782.yyamano@kt.rim.or.jp>

Ron Johnson <ron.l.johnson@cox.net> writes:

> $ 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?

How about this? It works fine for me on Darwin.

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

-- 
Yuji Yamano <yyamano@kt.rim.or.jp>
  The music spread everywhere. In the mouth. In the armpits. In the crotch.
  The music a way of flying up and flying past. --Susan Sontag
___________________
Nolug mailing list
nolug@nolug.org
Received on 04/14/03

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