[ale] Reverse of the 'cut' program

DJ-Pfulio DJPfulio at jdpfu.com
Tue Feb 10 17:06:55 EST 2015


egrep -v 'regex1|regex2|regex3' ....

Or you can pipe the output through egrep -v a few times to remove more and more
lines.

Sure, you can use a scripting language, but why?  BTW - I'd use perl. ;)

On 02/10/2015 02:22 PM, Pete Hardie wrote:
> grep -v <exclude pattern>
> 
> On Tue, Feb 10, 2015 at 2:16 PM, Justin Goldberg <justgold79 at gmail.com
> <mailto:justgold79 at gmail.com>> wrote:
> 
>     I am trying to parse a log file and exclude the lines that contain any one
>     of a few different strings, for example "don't show ones that contain
>     google.com <http://google.com> or ones that yahoo.com <http://yahoo.com>"
>     for example.
> 
>     I'm guessing that sed or awk would fit this purpose.
> 
>     I looked on the web but didn't find any examples that made sense to this
>     Linux newbie.
> 
>     Any replies or pointers will be greatly appreciated!
> 
> 


-- 
Got Linux? Used on smartphones, tablets, desktop computers, media centers, and
servers by kids, Moms, Dads, grandparents and IT professionals.


More information about the Ale mailing list