Created
November 10, 2017 09:55
-
-
Save milovtim/4612772fe3cbfcb1485729ff3bbf9e9e to your computer and use it in GitHub Desktop.
Fetch columnd from (log) file.
This example was used for tomcat access log
This file contains 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
FILE='' | |
FILTER_EXPR='' | |
DELIM=' ' | |
# col num -- 3, change if need another | |
cat $FILE |grep $FILTER_EXPR|awk -F"$DELIM" '{print $3}'|sort|uniq -c> result.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment