Thanks a lot!
I have only one issue with that : my files is like this :
Sample_A_1_1.fastq.gz
Sample_A_1_2.fastq.gz
Sample_A_2_1.fastq.gz
Sample_A_2_2.fastq.gz
..
So it could replace Sample_A_1_1.fastq.gz by Sample_A_2_2.fastq.gz?
Instead of sed 's/_1/_2/g' maybe it could work with sed 's/_1.fastq/_2.fastq/g'
Using parallel, try:
parallel --dry-run fastp -i {} {=s/_1/_2/=} ::: *_1.fastq.gzor in bash loop try one ofdo echo $i ${i/_1/_2}ordo echo $i ${i%_*}_2.fastq.gz.