jpk236 has asked for the wisdom of the Perl Monks concerning the following question:
I have a script which parses large files -- 800+ lines full of content. Here is the line I use to grep the pattern out:
$output = `/usr/bin/grep -B NUM PATTERN FILE | /usr/bin/head -n 1`;
where NUM is an incrementing #, PATTERN is the matching string, and FILE is the file being read. This line is in a do..until.
For some reason, randomly, grep: write error: Broken pipe or grep: writing output: Broken pipe will output to the error log. The line is still parsed correctly -- but these error logs are annoying and I'd really like to know whats causing them. Thanks in advance!
- Justin
$output = `/usr/bin/grep -B NUM PATTERN FILE | /usr/bin/head -n 1`;
where NUM is an incrementing #, PATTERN is the matching string, and FILE is the file being read. This line is in a do..until.
For some reason, randomly, grep: write error: Broken pipe or grep: writing output: Broken pipe will output to the error log. The line is still parsed correctly -- but these error logs are annoying and I'd really like to know whats causing them. Thanks in advance!
- Justin
Back to
Seekers of Perl Wisdom