How to pipe Bwa-mem output without saving SAM file
I never used CIRI2 but I think you can do the same way as I used to pipe with samtools:

bwa mem genome.fa reads.fastq | samtools sort -O BAM -o output.bam -

So it would be something like:

bwa mem genome.fa reads.fastq | CIRI2 &lt;your options&gt;

I think you will need to precise that CIRI2 input is STDIN.
I hope it will help,