Created
June 16, 2016 16:25
-
-
Save jdforsythe/973ad0a38d5f8bd266358b2f420b70aa to your computer and use it in GitHub Desktop.
Tricks in Bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat log.log | grep '\[2016\-05' | cut -c 23- | sort | uniq -c | sort -rn > 2016-05_error_count.log |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type d -name .svn -exec rm -rf {} \; | |
# find . -type d -name $1 -exec rm -rf {} \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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