Skip to content

Instantly share code, notes, and snippets.

@t1anchen
Created June 2, 2013 13:35
Show Gist options
  • Save t1anchen/5693672 to your computer and use it in GitHub Desktop.
Save t1anchen/5693672 to your computer and use it in GitHub Desktop.
Remove all white spaces of all files under current directory
find . -type f -regex '.*\ .*' | awk '{gsub(/\(/,"\\(",$0);gsub(/\)/,"\\)",$0);gsub(/\ /,"\\ ",$0);orig_fname=$0;gsub(/ /,".",$0);system("mv -v " orig_fname " " $0)}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment