Hugo Meyer on Thu, 1 Mar 2001 22:06:41 +0200


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

Re: GLUG: Is this possible?


I believe so...

[hugo@hamburger hugo]$ cat oldfile
word1 and some other stuff
word2 and some other stuff
word1 and word2 and some other stuff
some other stuff and word1 and word2
xxx word2 and word1 inside x's xxx
some other stuff
word1word2
word2word1
[hugo@hamburger hugo]$ cat oldfile | sed -e '/^.*word1.*word2.*$/d' -e
'/^.*word2.*word1.*$/d' > newfile
[hugo@hamburger hugo]$ cat newfile
word1 and some other stuff
word2 and some other stuff
some other stuff
[hugo@hamburger hugo]$

Regards

Hugo Meyer

----- Original Message -----
From: Pierre Naude <pierre@xxxxxxxxxx>
To: Glug <glug@xxxxxxxxxxxx>
Sent: Thursday, March 01, 2001 11:16 AM
Subject: GLUG: Is this possible?


> Morning All,
>
> Is there a simple way to do the following?
>
>
> grep string1 myfile | grep string2 | <delete that line from the file>
>
>
> Thanks
>
> Pierre
>
> pierre@xxxxxxxxxx
>
> ---
> To unsubscribe from this list: send the line "unsubscribe glug" in
> the body of a message to majordomo@xxxxxxxxxxxxx If you have a
> problem unsubscribing, please mail owner-glug@xxxxxxxxxxxx
>