pull out the first two lines of the example file
File.open("text.txt") do |f| 2.times { puts f.gets } end