I have the same issue with samtools no matter how hard I'm trying to grab the header it just doesn't work ..
Code:
samtools view -H file.bam > header.sam samtools reheader header.sam header.unique.bam [samopen] no @SQ lines in the header. [sam_read1] missing header? Abort!