Sunday, July 17, 2016

Concatenate fasta files and add file name to each line

grep '.*' file*.* >file_out.txt
Often we need to concatenate many files where each file represents a separate analysis, or DNA alignment or whatever. This use of grep adds the file name to each line of output. I needed this to create a database of locus by locus alignments for searching in Geneious.

No comments:

Post a Comment