Print sorted and counted occurances of words in a file $ cat commands | awk -F” ” ‘{print $4}’ | sort | uniq -c | sort -n Print sorted and counted occurance of a 'word' in a file cat some_commands | grep HINCRBY | awk ‘{print $5}’ | sort | uniq -c | sort -n