Commits

Steven! Ragnarök committed 321d086

A simple grep utility in Ruby.

Comments (0)

Files changed (1)

+regexp = Regexp.new ARGV[0]
+filestring = ARGV[1]
+
+File.read(ARGV[1]).lines.each_with_index do |line, i|
+  puts "#{i}: #{line}" if line =~ regexp
+end