finding unique headers in a fasta file using linux command line I tried to use the following command

uniq -u reference.fasta &gt;&gt; reference_uniq.fasta


I'd like a count of the unique headers.
If you just want the number of unique headers, you can do this:

grep '&gt;' reference.fasta | sort | uniq | wc -l


If you want a list of the unique headers, you can do this:

grep '&gt;' reference.fasta | sort | uniq


If you want a histogram of how many times each header occurs, you can do this:

grep '&gt;' reference.fasta | sort | uniq -c | awk '{printf("%s\t%s\n", $1, $2)}'