1 2 3 4 5 6 7 8 9
#!/usr/bin/env ruby i = 0 while l = STDIN.gets puts "line #{i} (#{l.strip})" i+=1 end