I have some files that names like this:
2311110-1_1.umi_bc1.fastp.fq.gz
2311110-1_1.umi.fastp.fq.gz
Now i want to change the names to:
231110-1_1.umi_bc1.fastp.fq.gz
231110-1_1.umi.fastp.fq.gz
After searching in google, i try to use the command "rename":
rename 's/2311110/231110/' 2311110*
However, after i do this, it doesn't work. The file name doesn't change. So is there any error with the command? By the way, there are so much files that is's impossible change the name using "mv".
If you use bash, you can use variable substitution:
See devhints.io/bash to learn more about variable manipulation.