Hello, How can I rename multiple fastq files? I have total 34 fastq files. how can I do this by using for loop? pls, let me know.
SRR6_Brain-IGA_in_Labeo_rohita_1.fastq.gz
SRR1_Brain-IGA_in_Labeo_rohita_2.fastq.gz
SRR2_Brain-PSR_from_Labeo_rohita_1.fastq.gz
SRR607_Brain-PSR_from_Labeo_rohita_2.fastq.gz
SRR60048_Pituitary-IGA_in_Labeo_rohita_1.fastq.gz
SRR63548_Pituitary-IGA_in_Labeo_rohita_2.fastq.gz
SRR60549_Pituitary-PSR_in_Labeo_rohita_1.fastq.gz
SRR60053_Liver-PSR_in_Labeo_rohita_1.fastq.gz
SRR60053_Liver-PSR_in_Labeo_rohita_2.fastq.gz
SRR69866_cSNPs_1.fastq.gz
SRR6986_cSNPs_2.fastq.gz
SRR6967_cSNPs_1.fastq.gz
SRR6067_cSNPs_2.fastq.gz
SRR69068_cSNPs_1.fastq.gz
SRR69068_cSNPs_2.fastq.gz
SRR70730_RNA-Seq_of_Selected_Rohu_1.fastq.gz
SRR70730_RNA-Seq_of_Selected_Rohu_2.fastq.gz
SRR70731_RNA-Seq_of_Control_Rohu_1.fastq.gz
SRR70731_RNA-Seq_of_Control_Rohu_2.fastq.gz
SRR7732_RNA-Seq_of_Unselected_Rohu_1.fastq.gz
SRR70732_RNA-Seq_of_Unselected_Rohu_2.fastq.gz
SRR8555_Liver_transcriptome_analysis_1.fastq.gz
SRR855_Liver_transcriptome_analysis_2.fastq.gz
I want my file name like this
SRR60048_R1.fastq.gz
SRR63548_R2.fastq.gz
rename perl expression.
https://learnbyexample.github.io/learn_perl_oneliners/perl-rename-command.html
brename
https://github.com/shenwei356/brename
Remove '-n' if you are okay with dry-run.
Remove
--dry-run
if you are okay with dry-run.in bash/zsh:
Remove
echo
if you are okay with dry-run.