perlquestion
jpk236
I have a script which parses large files -- 800+ lines full of content. Here is the line I use to grep the pattern out:<br>
<br>
<CODE>$output = `/usr/bin/grep -B NUM PATTERN FILE | /usr/bin/head -n 1`;</CODE><br>
<br>
where NUM is an incrementing #, PATTERN is the matching string, and FILE is the file being read. This line is in a do..until.<br>
<br>
For some reason, randomly, <CODE>grep: write error: Broken pipe</CODE> or <CODE>grep: writing output: Broken pipe</CODE> 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!<br>
<br>
- <a href="http://www.jpk236.com" target="_blank">Justin</a>