At 2004-06-30T122050+1200, Nick Rout wrote:

> for line in $(cat $1) ; do

Assuming the input is your 'testin' file below, this will expand to:

for line in foo bar foo bar ; do

> unfortunately, and for reasons unknown to me it doesn't work properly
> on lines with a space in.

Once you realise what the 'for...' line is expanding into, it should be
obvious why you script behaves the way it does.

> $ cat testin
> foo
> bar
> foo bar

Cheers,
-mjg
-- 
Matthew Gregan                     |/
                                  /|                [EMAIL PROTECTED]

Reply via email to