At 2005-01-13T13:09:33+1300, Steve Holdoway wrote:
> Another good reason I would have written the command
> cat sedsort.txt | sed -e 's/figner/finger/' -e 's/few/two/' > sedsort.txt

For the reasons just discussed for Rik's case, your solution does not
work either.

Pipes are a stream, so the shell is not reading the entire 'sedsort.txt'
file into a buffer before pushing it down the pipe to sed's stdin.

> I do it mainly as the left to right flow along the command line makes more
> sense to me, but it has the added advantage that sed is processing stdin,
> not the input file directly.

Except, in the case above, stdin is connected, via a pipe, to the open
file 'sedsort.txt'... which has just been clobbered by the '>
sedsort.txt' redirection.

> Now, if we'd all have been using VMS... this wouldn't be a problem (:

Yeah, we'd be too busy staring blankly at a wall and drooling. ;-)

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

Reply via email to