grep 'pattern to be kept' old.file > new.file