# Choose first N FASTA records perl -ne 'BEGIN {$/=">";$o=0}{chomp;$o$_"):last;$o++}' EXAMPLE.fa