6
1
I have files whose names look like this:
Sim1-2_40.36.chr20_sb.foo.indel.novoalign.sam
Sim1-2_40.36.chr20_sb.foo.indel.bwa.sam
What I want to do is to replace all indel
with snp
in the names
yielding
Sim1-2_40.36.chr20_sb.foo.snp.novoalign.sam
Sim1-2_40.36.chr20_sb.foo.snp.bwa.sam
But why does this unix command not work?
$ rename 's/indel/snp/' *.sam
I can't see the documentation for rename mentioning support for commands like 's/indel/snp/' , which rename utility are you using ? – nos – 2011-03-06T14:07:41.680
Looks like the OP is referring to http://man.cx/prename
– jamessan – 2011-03-06T14:14:01.6632What
doesn't work
about that command? Are you getting an error? Is it not changing the filenames? Something else? – jamessan – 2011-03-06T14:15:04.470