Last active
June 16, 2016 06:11
-
-
Save nalamchaitanya/aaf7a7f034cf8faa900a1483c2117e56 to your computer and use it in GitHub Desktop.
All hacks related to awk
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
awk -F ',' '{print $1,$2}' <filename> #Divides the ',' separated file and prints the column 1 and 2 by separting with space. | |
awk -F ',' '{a[$1]++;}END{print $1,a[$1]}' <filename> # Gives the frequency of words in file. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment