So, I've had an issue recently, where I had a whole bunch of folders with some common part that I needed to remove. After searching on the internet I came across a website with the following script:
for item in *; do
newItem=`echo $item | sed 's/find/replace/g'`
mv "$item" "$newItem"
So, in my case, when I tried to remove a string 'str', I did the following:
for i in *; do
j=`echo $i | sed 's/str//g'`
mv "$i" "$j"
Original article could be found here: http://snipplr.com/view/2736/rename-multiple-files-in-bash-using-regular...