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 this unix command doesn't work
$ rename 's/indel/snp/' *.sam

doesn't workabout that command? Are you getting an error? Is it not changing the filenames? Something else? – jamessan Mar 6 '11 at 14:15