With the recent samtools versions you can even shorten it to (...) | samtools view -o output.bam. It autodetects the format on the suffix, and the header is always written if writing bam.
• 0 views
•
link
what does that mean ?