Skip to content

Instantly share code, notes, and snippets.

@mrajo
Created April 7, 2016 21:04
Show Gist options
  • Save mrajo/9dfd4f21be0cdc383f2e3f9cd8f840a0 to your computer and use it in GitHub Desktop.
Save mrajo/9dfd4f21be0cdc383f2e3f9cd8f840a0 to your computer and use it in GitHub Desktop.
# change ext to source file extension
# change -t argument to expand to number of spaces
find . -name '*.ext' ! -type d -exec bash -c 'expand -i -t 2 "$0" >/tmp/ex && mv /tmp/ex "$0"' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment