I have files with names like this that I am trying to
What I have tried is using a script that looks like this
I am certain that the problems with the script are due to whitespaces based on the output given and a bit of sense. I would love to learn the correct way to solve the problem using a script with
rename
.
Code:
10 - 88JMtZq.jpg
17 - wkyjt7A.jpg
24 - sFDt4Hr.jpg
Code:
#!/usr/local/bin/bash
for i in `ls *.jpg`; do
mv $i $(echo $i | sed 's/[0-9][0-9] \- //')
done
sed
.