- get rid of newlines in the sequences of fasta files
awk '/^>/ { print (NR==1 ? "" : RS) $0; next } { printf "%s", $0 } END { printf RS }' fasta_file > new_file
http://stackoverflow.com/questions/15857088/remove-line-breaks-in-a-fasta-file
- find a sequence in a file and get the sequence and header
grep -B 1 "sequence of interest" fasta_file