I have hundreds fast.gz files, and they have the same format of file name:
5809029_GWU_DNA_269_L001_R1_001.fastq.gz
5809030_GWU_DNA_269_L001_R1_001.fastq.gz
How do I change the first and the second underscores to dots? eg:
5809029.GWU.DNA_269_L001_R1_001.fastq.gz
5809030.GWU.DNA_269_L001_R1_001.fastq.gz
without changing the remaining underscores?
I have tried rename 's/_GWU_DNA/\.GWU\.DNA/' *gz, it didn't change anything. So I'm thinking about a for loop, any idea? Thank you!