I want to use SamToFastq in Picard tools to convert 100 bam files to fastq (pair-end). I wrote a loop, but it does not work. Anyone can help me to look at the code. I have no idea what's going on. Appreciate ahead.
#!/bin/bash bamfolder="/path/to/folder/*" for b in $bamfolder do echo $b java -jar picard.jar SamToFastq \ I=$b \ FASTQ= /path/to/folder/*_R1.fastq \ SECOND_END_FASTQ= /path/to/folder/*_R2.fastq done