Created
April 18, 2010 20:33
-
-
Save morganp/370533 to your computer and use it in GitHub Desktop.
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
#Small function to generate a comma delimited dictionary on a unix system | |
def gen_dictionary | |
f = open("| cat /usr/share/dict/words") | |
g = Array.new | |
while (foo = f.gets) | |
g << foo | |
end | |
g.each do |element| | |
element = element.strip | |
print element + "," | |
end | |
end | |
gen_dictionary |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Totally forked this.