6
rated 0 times
[
6]
[
0]
/ answers: 1 / hits: 1116
/ 3 Years ago, thu, june 10, 2021, 10:34:37
I am new to scripting, and I have a directory with all files named num.pdb.ostat. I would like to rename all num.ostat (that is deleting the .pdb in all). For a single file this works:
mv 2.pdb.ostat 2.ostat
but when I try to do it for all files in folder with this script
for num in ./*; do mv ${num}.pdb.ostat ${num}.ostat; done
nothing happens
Can anyone tell me, where I went wrong?
More From » bash