semi OT: sh scripting problem
tevans.uk at googlemail.com
Wed Aug 1 15:00:49 UTC 2007
On Wed, 2007-08-01 at 10:35 -0400, Robert Huff wrote:
> (This is probably a FAQ, and I'll take a pointer (or even the
> magic words to identify the problem) instead of an answer.)
> Let's suppose I have a file FILE, with contents:
> bar grill
> If I do "cat FILE", everything comes out fine.
> If, however, I write a script:
> for i in `cat FILE`
cat FILE | while read i
> $i is set to
> Is there a way within the script - or, failing that, by
> modifying FILE - to not break at the whitespace?
> Robert Huff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20070801/ca9fdaf2/attachment.pgp
More information about the freebsd-questions