Skip to content

Instantly share code, notes, and snippets.

@napsternxg
Created October 15, 2012 12:56
Show Gist options
  • Save napsternxg/3892322 to your computer and use it in GitHub Desktop.
Save napsternxg/3892322 to your computer and use it in GitHub Desktop.
Count all the number of times a line occurs in a file ignoring case
cat sample | sort -f | uniq -ci | sort -n | sed -e 's/\([0-9]\{1,\}\)[ ]*\(.*\)/\2: \1/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment