version 1.0.0, 2013-10-19 : Initial version
grep utility using perl one-liners
Perl one-liners to simulate the grep utility.1. grep regexp
This shell command do grep a regexp on the input you want (a file or stdin using pipes for example).
perl -ne '/regexp/&&print'
2. grep -i regexp
This shell command do grep a case insensitive regexp on the input you want (a file or stdin using pipes for example).
perl -ne '/regexp/i&&print'
3. grep -v regexp
This shell command do grep an exclusion regexp on the input you want (a file or stdin using pipes for example).
perl -ne '/regexp/||print'
Note
If you want the regexp of the grep -v to be case insensitive, just add
the "i" at the end of the /regexp/ like in the grep -i example.