Ok, when I do it that way, I get line count for accepted_hits.bam but the following error for accepted_hits_conc.bam:
[bam_header_read] EOF marker is absent. The input is probably truncated.
[bam_header_read] invalid BAM binary header (this is not a BAM file).
[main_samview] fail to read the header from "accepted_hits_conc.bam".
0
So I think the above samtools command (samtools view -f 0x2 accepted_hits.bam >accepted_hits_conc.bam) for extracting concordant aligned pairs into their own bam file didn't work...
I can view counts of accepted hits and concordant hits if I do samtools view -c accepted_hits.bam and samtools view -c -f 0x2 accepted_hits.bam, but I don't want to just get a count of how many read pairs are concordant, I want to make a new bam file consisting only of concordant read pairs...