blob: 9ce7cddb7b77cd607bf96b8d0bda83fe23db435d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# Grep file for regular expression and output to STDOUT
#
# Usage:
# --let $grep_file= /path/to/your/file
# --let $grep_regex= your_regex_string
# --source include/grep.inc
--perl
open (my $fh, "<", "$ENV{grep_file}") or die $!;
while (<$fh>)
{
/$ENV{grep_regex}/ &&
print;
}
close $fh;
EOF
|