Skip to content

Commit

Permalink
change word-frequency script's definition of word
Browse files Browse the repository at this point in the history
  • Loading branch information
garybernhardt committed Aug 17, 2017
1 parent 9484df7 commit ffbbf60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/word-frequency
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

ruby -F'[^a-zA-Z]+' -ane '
ruby -F'[^a-zA-Z0-9]+' -ane '
BEGIN { $words = Hash.new(0) }
$F.each { |word| $words[word.downcase] += 1 }
END { $words.each { |word, i| printf "%3d %s\n", i, word } }
Expand Down

0 comments on commit ffbbf60

Please sign in to comment.