Re: semi OT: sh scripting problem

2007-08-01 Thread Robert Huff
Eric Crist writes: > > If you're using bash, set IFS to the newline only before looping. I > > guess the > > tcsh also has a similar setting, but I wouldn't know where to look. > > > > --- > > IFS=" > > " > > This also works for sh. To the OP, simply add the lines above > your for l

Re: semi OT: sh scripting problem

2007-08-01 Thread Tom Evans
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: > > foo > bar grill > baz > >

Re: semi OT: sh scripting problem

2007-08-01 Thread Eric Crist
On Aug 1, 2007, at 9:54 AMAug 1, 2007, Heiko Wundram (Beenic) wrote: Am Mittwoch 01 August 2007 16:35:44 schrieb Robert Huff: Is there a way within the script - or, failing that, by modifying FILE - to not break at the whitespace? If you're using bash, set IFS to the newline only befo

Re: semi OT: sh scripting problem

2007-08-01 Thread Heiko Wundram (Beenic)
Am Mittwoch 01 August 2007 16:35:44 schrieb Robert Huff: > Is there a way within the script - or, failing that, by > modifying FILE - to not break at the whitespace? If you're using bash, set IFS to the newline only before looping. I guess the tcsh also has a similar setting, but I wouldn't

Re: semi OT: sh scripting problem

2007-08-01 Thread Don Hinton
On Wednesday 01 August 2007 09:35:44 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: > > foo > bar grill > baz > >

semi OT: sh scripting problem

2007-08-01 Thread Robert Huff
(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: foo bar grill baz If I do "cat FILE", everything comes out fine. If,