dear all,
I have so many fastq files like this;
XCGD2_R2.FB-P7-Rd2-LC.10_trimLCwithMCF.fastq but instead of 10 I have different numbers. on the other hand I have this file; XCGD2_R2.FB-P7-Rd2_trimLCwithFlexbar.fastq
I want to cancotenate the first files with second .Some how I need to get basename that are common but I don't know how? they are mix with other files for this reason I want to get common part.
any help, thanks
dariober thank you .could you please help me to undrestand this code?
for i in R2.*_trimLCCwithMCF.fastq; do cat "$i"
basename $i _trimLCCwithMCF.fastq
_trimLCwithFlexbar.fastq >basename $i _trimLCCwithMCF.fastq
_trimLCC_both.fastq; done(Please format it properly with Code Sample option.)
As it looks to me unformatted, it doesn't make much sense. Among other things, you are redirecting the output of
cat
to thebasename
function. Maybe it works but if so it's certainly very cryptic!To me it doesn't look like correct bash code.