Skip to content

Instantly share code, notes, and snippets.

@RichardJohnn
Created June 25, 2014 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardJohnn/cd65d29bc85ee2929cd8 to your computer and use it in GitHub Desktop.
Save RichardJohnn/cd65d29bc85ee2929cd8 to your computer and use it in GitHub Desktop.
auto remove .orig files on os x
#brew install fswatch
#replace ~/shit with directory to watch, -r for recursively
fswatch -r0 ~/shit | while read -d "" event
do
regex='\.orig$'
if [[ ${event} =~ $regex && -e ${event} ]]
then
rm ${event}
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment