[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: syntax [grep/tee]



* Hugh Saunders (hugh@mjr.org) [030622 02:16]:
> hello, a couple of fairly simple bashish questions:
> 
> 1. whats the advantage of using |tee -a rather than >> ?

tee sends its input to a file and also to standard out.  That's where it
gets its name.  Imagine the input as the bottom part of a capital T
getting split into 2 outputs.

Using the >> operator just sends it to one place: the specified file.

> 2. how can i consolidate |grep -v from |grep -v archive?
> - i think it should be something like |grep -v \(archive|from\) but that
>   doesnt seem to work..

some_command | egrep '(archive|from)'

good times,
Vineet
-- 
http://www.doorstop.net/
-- 
"As we enjoy great advantages from inventions of others, we should be glad
of an opportunity to serve others by any invention of ours; and this we
should do freely and generously."  --Benjamin Franklin

Attachment: signature.asc
Description: Digital signature


Reply to: