fastx_getlabels command
Writes the sequence labels from a FASTQ or FASTA file to a text file with one label per line. The output file name is given by the -output option.
With FASTA format, the effect is essentially the same as:
grep "^>" input.fa | sed "-es/^>//" > labels.txt
With FASTQ format, there is no simple way to do this using Linux commands because the Q score sequence can start with the same character(s) as a read label.
Example
usearch -fastx_getlabels reads.fq -output labels.txt