Skip to content

Instantly share code, notes, and snippets.

@minhng99
Last active June 11, 2017 14:30
Show Gist options
  • Save minhng99/3d71ca5b3d96ef555ca58cd64d112c12 to your computer and use it in GitHub Desktop.
Save minhng99/3d71ca5b3d96ef555ca58cd64d112c12 to your computer and use it in GitHub Desktop.
#!/bin/bash
find a/ -type f -print | while read f
do
mv "$f" "$(sed 's/[^0-9A-Za-z_./()- ]/_/g' <<< "$f")"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment