bin/rubyc in rubyc-0.0.4 vs bin/rubyc in rubyc-0.0.5

- old
+ new

@@ -74,9 +74,20 @@ proc.call(line) end puts counts end + desc :grep, "Grep" + def grep(matcher, code = nil) + matcher = eval(matcher) + if code + proc = eval( "Proc.new{|line| l = line; #{code}}" ) + else + proc = nil + end + puts STDIN.grep(matcher, &proc) + end + desc :uniq, "uniq" def uniq puts STDIN.to_a.uniq end