fitshdr man page
fitshdr — List headers from a FITS file
fitshdr [-q N] [<infile>]
List headers from a FITS file specified on the command line, or else on stdin, printing them as 80-character keyrecords without trailing blanks.
- -q N
Quit after reading the Nth header, where N is an integer (optional space between -q and N).