Perl One Liners
- -e enable expression
- -n loop over input
- -l strip newlines on input, but print them out with output
- -a enable autosplit, resulting in array @F
For example, say you have a tab delimited file of oligo sequences, with id in the 4th column, and sequence in the 5th column, and you want to convert it to a fasta file:
perl -nale 'print ">$F[3]\n$F[4]"' inputfile.txt