Shell : Remove blank spaces from filenames 1

Just like I last posted the below script can be used to remove blank spaces from file names.

find . -name "* *"|while read file
target=`echo "$file"|tr -s ' ' '_'`
mv "$file" "$target"

One comment on “Shell : Remove blank spaces from filenames

  1. Reply Micaela Schadel Apr 8,2011 11:51 pm

    Which is truly worth it to read, and does indeed make me wonder where it’s all going. We are curious can you supply even more information about this? I’m a bit puzzles to how this can all add together. My buddy did tell me a few days ago, around the lines of what you’re talking about, however it is still challenging to believe.

Leave a Reply