i\'d like perl to do a one-liner like grep
a bit like this, but i\'m not sure what to add to make it work
$ (echo a ; echo b ; echo c) | per
To echo mob's comment:
If you want to use Perl regexes try ack
: http://betterthangrep.com/
(echo a; echo b; echo c) | perl -ne 'print if /a/'
You can do the same with Ruby, if you can afford other options
$ (echo a; echo b; echo c) | ruby -ne 'print if /a/'
a
$ (echo a; echo b; echo c) | ruby -ne 'print if $_["a"]'
a