perl -lne 'print if /pattern here/' old_file.txt > new_file.txt