Hi all,
I have 170 fastq files from miSeq. They are named as 1_Sxx_L001…, 2_Sxx_L001…, 3_Sxx_L001… consecutively.
If I only need files from 1 to 120. How to quickly copy those files? I was thinking about using a for loop, but keep getting errors.
I can try this, but inefficient and error prone.
cp [1-9]_*.gz;
cp [1-9][0-9]_*.gz;
cp [1-9][0-1][0-9]_*.gz;
cp 120.*gz
thanks in advance.
example file names:
100_S122_L001_R1_001.fastq.gz 126_S145_L001_R2_001.fastq.gz 152_S168_L001_R1_001.fastq.gz 23_S71_L001_R2_001.fastq.gz 4_S36_L001_R1_001.fastq.gz 75_S34_L001_R2_001.fastq.gz
100_S122_L001_R2_001.fastq.gz 127_S155_L001_R1_001.fastq.gz 152_S168_L001_R2_001.fastq.gz 24_S82_L001_R1_001.fastq.gz 4_S36_L001_R2_001.fastq.gz 76_S45_L001_R1_001.fastq.gz
I have 170 fastq files from miSeq. They are named as 1_Sxx_L001…, 2_Sxx_L001…, 3_Sxx_L001… consecutively.
If I only need files from 1 to 120. How to quickly copy those files? I was thinking about using a for loop, but keep getting errors.
I can try this, but inefficient and error prone.
cp [1-9]_*.gz;
cp [1-9][0-9]_*.gz;
cp [1-9][0-1][0-9]_*.gz;
cp 120.*gz
thanks in advance.
example file names:
100_S122_L001_R1_001.fastq.gz 126_S145_L001_R2_001.fastq.gz 152_S168_L001_R1_001.fastq.gz 23_S71_L001_R2_001.fastq.gz 4_S36_L001_R1_001.fastq.gz 75_S34_L001_R2_001.fastq.gz
100_S122_L001_R2_001.fastq.gz 127_S155_L001_R1_001.fastq.gz 152_S168_L001_R2_001.fastq.gz 24_S82_L001_R1_001.fastq.gz 4_S36_L001_R2_001.fastq.gz 76_S45_L001_R1_001.fastq.gz
Comment