Grep command, to remove lines containing a specified word

I want to use grep in the following way:

grep -v "END","EXPDTA" 1bmz_model1.pdb > 1bmz_model.pdb

I want the grep command to remove the lines which contain the words "END" and "EXPDTA", but all i get in the output, is a copy of the original file. The command works fine when I try to search and remove with a single word, but not with two words.

1

1 Answer

egrep -v "END|EXPDTA" infile > outfile
6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like