To extract the comment lines (and thus the lines with 0 hits), you could use:
If you want only the 'Query' line, then you could use the following instead:
Code:
awk '/^\#/' file > newfile
Code:
awk '/^\# Query/{print $0}' file > new file
Comment