(at the very least to prove to the guys at the office how much cooler perl is, than just the regular shell commands)
#!/usr/bin/perl # $start=shift; $pattern=shift; open(FILE,"$start"); while (<FILE>){ if (/$pattern/) { print; } }
In reply to pattern match -vs- *ix grep by ministry
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |