I often need to find a particular sequence in a fasta file and print it. For those who don\'t know, fasta is a text file format for biological sequences (DNA, proteins, etc.
$ perl -0076 -lane 'print join("\n",@F) if $F[0]=~/sequence2/' file