Skip to content

Instantly share code, notes, and snippets.

@danwarfel
Last active August 6, 2016 13:25
Show Gist options
  • Save danwarfel/25ca3715d4f4c7082dd4 to your computer and use it in GitHub Desktop.
Save danwarfel/25ca3715d4f4c7082dd4 to your computer and use it in GitHub Desktop.
find src/dir/ -name '*.txt' | while read file; do
mv "$file" "target/dir/$(tr / _ <<< "$file")"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment