-2

I want to use rename to process a bundle of files like this:

GSM5901579_203007520013_R01C01_Grn.idat.gz -> 203007520013_R01C01_Grn.idat.gz
GSM5901579_203007520013_R01C01_Red.idat.gz -> 203007520013_R01C01_Red.idat.gz
GSM5901580_203007520013_R03C01_Grn.idat.gz -> 203007520013_R03C01_Grn.idat.gz

I would be grateful if you can give any suggestion!

  • 1
    Does [Batch renaming files](https://unix.stackexchange.com/a/1140/266568) answer your question? – U880D Mar 22 '23 at 08:21
  • "_This answer don't works for me ... I'm wondering how to use wildcard character to represent the variantes_", that's somehow already mentioned within the linked answer. – U880D Mar 22 '23 at 08:33
  • 1
    @U880D THX! follow the linked answer, I use `zmv -w 'GSM590*_(203*.idat)' '$2' `solve my problem! – Jichen Wen Mar 22 '23 at 08:47

1 Answers1

0

Follow this answer, I use the following command solve my problem!

zmv -w 'GSM590*_(203*.idat)' '$2'