I currently have an issue with reading files in one directory. I need to take all the fastq files in a file and run the script for each file then put new files in an ‘Edited_sequences’ folder. The one script I had is
perl -ne '$i++; if($i<80001){print}' BM2003_TCCCAGAACAAC_L001_R1_001.fastq > ./Edited_sequences/BM2003_TCCCAGAACAAC_L001_R1_001.fastq
It takes the first 80000 lines in one fastq file then outputs the result. Now for example I have 2000 fastq files, then I need to copy and paste for 2000 times. I know there is a glob command suit for this situation but I just do not know how to deal with that. Please help me out.
You can use perl to do copy/paste for you, first argument
*.fastq
are all fastq files, and second./Edited_sequences
is target folder for new files,