[SLUG] grep sed

john at johnallsopp.co.uk john at johnallsopp.co.uk
Tue Feb 28 17:55:29 GMT 2006


> On Tue, Feb 28, 2006 at 03:20:06PM GMT, John Allsopp wrote:
>> > Al said: John, I can see how you got this to work, but I'm
>> uncertain
>> > about what you were trying to do with the '| tee out.txt' bit.  I
>> > can see how you'd use grep -l to find all the files containing
>> your
>> > string before passing that list to xargs and doing some sed magic
>> to
>> > change the old to new numbers.  Could you explain where 'tee' fits
>> > in please?
>>
>> I've always been irritated by the > out.txt to redirect the output
>> to
>> a file, whereupon you can't see what's being output. | tee out.txt
>> is
>> a T junction, a stream splitter: the output goes to the file, but it
>> also goes to stdout too.
>
> OK. Fair enough.  I guess it's just not my cup of tea!  Seems like
> just
> creating superfluous files while watching lots of stuff disappear of
> the
> top of your screen.
>
> A little puzzled,

Well, it created a lot of output, so what else would you do?

J




More information about the Scarborough mailing list