Last active
March 21, 2019 14:27
-
-
Save leonlaser/9b586a4ba079928cdbc8f35980af9460 to your computer and use it in GitHub Desktop.
[Search file/log with grep/regex and count occurrences] #regex #grep #file #logfile
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
#!/bin/bash | |
grep "$regex" -o $file | sort | uniq -c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment