Skip to content

Instantly share code, notes, and snippets.

@kzrl
Created October 29, 2013 00:27
Show Gist options
  • Save kzrl/7207234 to your computer and use it in GitHub Desktop.
Save kzrl/7207234 to your computer and use it in GitHub Desktop.
Find words that end in 'cat'. Then, count them. Quick demo of the power of the command line.
$ grep cat$ /usr/share/dict/words
bobcat
cat
Chilcat
copycat
crazycat
ducat
gaycat
hellcat
hellicat
hepcat
kitcat
Magnificat
muscat
polecat
pulicat
pusscat
pussycat
saltcat
scat
scratchcat
snobscat
supplicat
tearcat
tipcat
tomcat
wheencat
whipcat
wildcat
wullcat
$ grep cat$ /usr/share/dict/words | wc -l
29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment