Skip to content

Instantly share code, notes, and snippets.

@jdforsythe
Created June 16, 2016 16:25
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 jdforsythe/973ad0a38d5f8bd266358b2f420b70aa to your computer and use it in GitHub Desktop.
Save jdforsythe/973ad0a38d5f8bd266358b2f420b70aa to your computer and use it in GitHub Desktop.
Tricks in Bash
cat log.log | grep '\[2016\-05' | cut -c 23- | sort | uniq -c | sort -rn > 2016-05_error_count.log
find . -type d -name .svn -exec rm -rf {} \;
# find . -type d -name $1 -exec rm -rf {} \;
find . -name "*.t1" -exec bash -c 'mv "$1" "$(sed "s/\.htm$/.html/" <<< "$1")"' - '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment