Re: awk or sed?
On Tue, 7 Apr 1998, A. M. Varon wrote:
> Hi,
>
> [Sorry if this is off-topic.]
>
> I have two files say, file1 and file2
>
> file1 contains: file2 contains:
> alpha alpha
> bravo
> charlie
>
> What I want to do is compare the two files, and delete the contents of
> file1 according to file2. So, from the above, I'll have to delete the word
> alpha from file1. Can it be possible using sed? or awk?
>
> thanks,
Hehe, try grep!
grep -vFf file2 file1
should do it.
George Bonser
Just be thankful that Microsoft does not manufacture pharmaceuticals.
http://www.debian.org
Debian/GNU Linux ... the maintainable operating system.
--
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Reply to: