of course the standard unix way is to make the output go to stdout and
redirect it with > if you want it in a file.

I think I was missing the IFS line, other than that, and outputting to a
file, its the same as mine.


On Wed, 30 Jun 2004 12:24:48 +1200
Phill Coxon <[EMAIL PROTECTED]> wrote:

> Steve sent me this which works great. 
> 
> Thanks Nick & Rex for your suggestions to. 
> 
> -----Forwarded Message-----
> From: [EMAIL PROTECTED]
> To: Phill Coxon <[EMAIL PROTECTED]>
> Subject: Re: Help with sed
> Date: Wed, 30 Jun 2004 12:09:57 +1200
> 
> Hi Phill,
> 
> Try this...
> 
> 8>< cut here 8><
> #!/bin/bash
> 
> IFS='
> '
> for Line in `cat <infile>`
> do
>     echo $Line
>     echo '"'$Line'"'
>     echo '['$Line']'
> done > <outfile>
> 8>< cut here 8><
> 
> Replacing <infile> and <outfile> as necessary
> 

-- 
Nick Rout <[EMAIL PROTECTED]>

Reply via email to