Skip to content

Instantly share code, notes, and snippets.

@AnimaWish
Created April 6, 2012 04:30
Show Gist options
  • Save AnimaWish/2316868 to your computer and use it in GitHub Desktop.
Save AnimaWish/2316868 to your computer and use it in GitHub Desktop.
filename = ARGV.first
text = ''
text = File::open(filename)
readit = text.read
contents = readit.downcase.split(/\n+/)
woo = contents.sort
yondernew = Array.new
woo.each do |item|
yondernew.push(item.split(/\t+/))
end
yondernew.each do |item|
if item[1] == nil
item.push('')
end
end
print yondernew
puts
puts "Please choose a name for the new file. (Ctrl-C to quit)"
checkmytrips = gets
if checkmytrips == nil
puts "fuck"
else
p checkmytrips
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment