Skip to content

Instantly share code, notes, and snippets.

@rsds143
Created August 11, 2010 16:45
Show Gist options
  • Save rsds143/519294 to your computer and use it in GitHub Desktop.
Save rsds143/519294 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
f = File.new ARGV[0]
lineend = ARGV[1].to_i
counter = 0
while(line = f.gets and counter<lineend)
puts line
counter += 1
end
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment