<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Searching Errors in a log file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910408#M97022</link>
    <description>You are missing the terminating single-quote for the awk construct. The single quote should be placed after the action specified by the END statement...imho change the line below:&lt;BR /&gt;&lt;BR /&gt;from...&lt;BR /&gt;TOTAL_LINES=$(awk '{nlines = nlines + 1}' END {print nlines} &amp;lt;$3)&lt;BR /&gt;to...&lt;BR /&gt;TOTAL_LINES=$(awk '{nlines = nlines + 1} END {print nlines}' &amp;lt;$3)&lt;BR /&gt;&lt;BR /&gt;~hope it helps&lt;BR /&gt;</description>
    <pubDate>Wed, 20 Dec 2006 13:42:10 GMT</pubDate>
    <dc:creator>Sandman!</dc:creator>
    <dc:date>2006-12-20T13:42:10Z</dc:date>
    <item>
      <title>Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910394#M97008</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am looking out for a shell script to accomplish the below :-&lt;BR /&gt;&lt;BR /&gt;We want to capture each occurance of the word Error ( case insensitive ) in a log file and 5 lines below each of the lines and store the output in a file. &lt;BR /&gt;&lt;BR /&gt;Can anyone post the script ?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv&lt;BR /&gt;</description>
      <pubDate>Sun, 10 Dec 2006 01:13:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910394#M97008</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-12-10T01:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910395#M97009</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Some open issues:&lt;BR /&gt;- you say 'word': is it really a separate word (white space around)? 'Error:' for example would NOT meet this criterium.&lt;BR /&gt;- you say case insensitive: may the be ANY combinations of Error, ErrOR or is there a restriction to Error, error and ERROR?&lt;BR /&gt;&lt;BR /&gt;I offer an awk solution (untested).&lt;BR /&gt;&lt;BR /&gt;awk '/Error/ || /error/ || /ERROR/ {count=6}&lt;BR /&gt;count {print;count--}' infile &amp;gt;outfile&lt;BR /&gt;&lt;BR /&gt;mfG Peter</description>
      <pubDate>Sun, 10 Dec 2006 06:08:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910395#M97009</guid>
      <dc:creator>Peter Nikitka</dc:creator>
      <dc:date>2006-12-10T06:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910396#M97010</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;try the attached script with these parameters: $1="Error" , $2="5", $3="path_to_file"&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Sun, 10 Dec 2006 06:15:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910396#M97010</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2006-12-10T06:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910397#M97011</link>
      <description>&lt;BR /&gt;Perl regular expression have something a 'break' match between words: \b&lt;BR /&gt;&lt;BR /&gt;It helps to make sure that a script like requested does trigger on "Error:" but not on "terrorist".&lt;BR /&gt;&lt;BR /&gt;Example usage:&lt;BR /&gt;&lt;BR /&gt;perl -ne "$count=5 if /\berror\b/i; print if $count-- &amp;gt; 0" your-log-file&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Sun, 10 Dec 2006 09:02:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910397#M97011</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-12-10T09:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910398#M97012</link>
      <description>And just a note about other 'error' conditions. You might want to search for other keywords that also signify problems: &lt;BR /&gt; &lt;BR /&gt;grep -i -e fail -e warn -e alert -e critical -e abort /some-dir/some-log&lt;BR /&gt; &lt;BR /&gt;The above grep just shows the line where one or more of the search strings match. Use it to see if there are any other messages that might be important but do not have Error in the entry.</description>
      <pubDate>Sun, 10 Dec 2006 16:25:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910398#M97012</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2006-12-10T16:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910399#M97013</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;Bill makes a good point, and we can easily use Hein's Perl snippet thusly:&lt;BR /&gt;&lt;BR /&gt;# perl -ne '$count=5 if /\b(error|warn|critical|alert|abort|fail)\b/i;print if $count-- &amp;gt; 0' logfile&lt;BR /&gt;&lt;BR /&gt;Thus if the file (or files) you specify as arguments contain any of the words "error", "warn", "critical", "alert", "abort" or "fail", the line on which any one occurs will be printed and four more lines afterwards.&lt;BR /&gt;&lt;BR /&gt;As written, you can process multiple files at one simply by passing their names as arguments.  If you would like to do this, *and* keep track of the filename for which matches occur, modify the script thusly:&lt;BR /&gt;&lt;BR /&gt;# perl -ne '$count=5 if /\b(error|warn|critical|alert|abort|fail)\b/i;print "$ARGV:$_" if $count-- &amp;gt; 0' log1 log2 log3&lt;BR /&gt;&lt;BR /&gt;...Now output can look like:&lt;BR /&gt;&lt;BR /&gt;log1:critical alert: line-3&lt;BR /&gt;log1:line-4&lt;BR /&gt;log1:line-5&lt;BR /&gt;log1:line-6&lt;BR /&gt;log1:line-7&lt;BR /&gt;log2:ERROR at line-6&lt;BR /&gt;log2:line-7&lt;BR /&gt;log2:line-8&lt;BR /&gt;log2:line-9&lt;BR /&gt;log2:line-10&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;..JRF...</description>
      <pubDate>Sun, 10 Dec 2006 16:59:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910399#M97013</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-10T16:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910400#M97014</link>
      <description>This AWK example works hpux 11.11&lt;BR /&gt;I put a space before each word.&lt;BR /&gt;so it would get things like  " Error:"&lt;BR /&gt;&lt;BR /&gt;awk -F: '&lt;BR /&gt;(tolower($0) !~ / error| warn| alert| critical| abort| invalid/) {next}&lt;BR /&gt;{&lt;BR /&gt;   print "\n" $0&lt;BR /&gt;   for (i=1;i &amp;lt; 6;i++)&lt;BR /&gt;   {getline&lt;BR /&gt;    print $0&lt;BR /&gt;   }&lt;BR /&gt;} ' /var/adm/syslog/syslog.log&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Dec 2006 10:46:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910400#M97014</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2006-12-11T10:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910401#M97015</link>
      <description>Hi Rory:&lt;BR /&gt;&lt;BR /&gt;Yes, placing a space (blank) character before the words in the 'awk' solution helps, but it dones *not* solve the number of matches that Perl does.&lt;BR /&gt;&lt;BR /&gt;For starters, what if the space were a tab character?  The use of '\b' in Perl regular expressions covers word boundries delimited by spaces, tabs and most punctuation characters like ":" and "-" that might appear like "alert-bad thing happened".&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 11 Dec 2006 11:01:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910401#M97015</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-11T11:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910402#M97016</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This may not be what you require, but I have used it alot.  It will watch your log files and email you whenever it finds any security violations or errors.  YOu can tailor it to watch for certain words - like "error"&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sourceforge.net/projects/logcheck/" target="_blank"&gt;http://sourceforge.net/projects/logcheck/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Dec 2006 11:29:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910402#M97016</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2006-12-11T11:29:01Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910403#M97017</link>
      <description>&lt;BR /&gt;Jim,&lt;BR /&gt;&lt;BR /&gt;Like all programming problems there are many tools with many solutions. My intent was to show how you can use grep like expressions inside of awk  The tolower/toupper function inside the if statement is novel approach, along with the regular expression syntax. Of course, I made the fatal error of assuming that the only type of white space is a "space". Which in the syslogs I looked at was true.&lt;BR /&gt;&lt;BR /&gt;a partial solution:&lt;BR /&gt;&lt;BR /&gt;awk -F: '&lt;BR /&gt;(tolower($0) ~ /[ \t]error|[ \t]warn|[ \t]alert|[ \t]critical|[ \t]abort|[ \t]invalid/ ) {&lt;BR /&gt;   print "\n" $0&lt;BR /&gt;   for (i=1;i &amp;lt; 6;i++)&lt;BR /&gt;   {&lt;BR /&gt;    getline&lt;BR /&gt;    print $0&lt;BR /&gt;   }&lt;BR /&gt;} ' /var/adm/syslog/syslog.log&lt;BR /&gt;&lt;BR /&gt;To bad I could not get the following to work:&lt;BR /&gt;(tolower($0) ~ /[:space:]error|[:space:]warn|[:space:]alert|[:space:]critical|[:space:]abort|[:space:]invalid/)&lt;BR /&gt;&lt;BR /&gt;Rory&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Dec 2006 12:26:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910403#M97017</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2006-12-11T12:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910404#M97018</link>
      <description>Hi Rory:&lt;BR /&gt;&lt;BR /&gt;I did not mean any offense; rather only that Perl has some of the best regular expression support available.   Your use of '[:space:]' enables whitespace (a space or a tab) detection and is good defensive technique.  This works:&lt;BR /&gt;&lt;BR /&gt;# awk '{if (tolower($0) ~/[[:space:]]error|[[:space:]]warn/) {print $0}}' filename&lt;BR /&gt;&lt;BR /&gt;Note the double square brackets.  This is necessary to create a character class consisting of '[:space:]'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Dec 2006 12:46:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910404#M97018</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-11T12:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910405#M97019</link>
      <description>Jim,&lt;BR /&gt;&lt;BR /&gt;No offense was taken and I hope my reply did not suggest that I was offended. The discussion about problems and solutions are always good.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rory</description>
      <pubDate>Tue, 12 Dec 2006 12:00:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910405#M97019</guid>
      <dc:creator>Rory R Hammond</dc:creator>
      <dc:date>2006-12-12T12:00:55Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910406#M97020</link>
      <description>Hi John,&lt;BR /&gt;&lt;BR /&gt;Is this the right syntax to use your script ?&lt;BR /&gt;&lt;BR /&gt;$scriptname.sh "Error" "5" "logfilename"</description>
      <pubDate>Tue, 12 Dec 2006 19:20:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910406#M97020</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-12-12T19:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910407#M97021</link>
      <description>I was trying to execute the "john korterman's" script. I got the error message.&lt;BR /&gt;&lt;BR /&gt;./tlog: syntax error at line 25: `TOTAL_LINES=$' unexpected&lt;BR /&gt;&lt;BR /&gt;There appears to be some syntax error in the line:-&lt;BR /&gt;TOTAL_LINES=$(awk '{nlines = nlines + 1}' END {print nlines} &amp;lt;$3)&lt;BR /&gt;&lt;BR /&gt;=====================================================================&lt;BR /&gt;Below is the complete script.&lt;BR /&gt;&lt;BR /&gt;script name:tlog&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;# Print number of lines, $2,&lt;BR /&gt;# after matched , case-insensitive string, $1,&lt;BR /&gt;# from file, $3&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;typeset -i  FIRST_LINE=0 LAST_LINES=0 MATCH_LINE_NO=0 LINE_AFTER=0 TOTAL_LINES=0&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# Check params..&lt;BR /&gt;if [ "$#" != 3 ]&lt;BR /&gt;then&lt;BR /&gt;        echo wrong number of parameters&lt;BR /&gt;        echo par1=string, par2=number of lines, par3=file&lt;BR /&gt;        exit 1&lt;BR /&gt;fi&lt;BR /&gt;#&lt;BR /&gt;if [ ! -r $3 ]&lt;BR /&gt;then&lt;BR /&gt;        echo Cannot read $3&lt;BR /&gt;        exit 1&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;# Number of lines in $3&lt;BR /&gt;TOTAL_LINES=$(awk '{nlines = nlines + 1}' END {print nlines} &amp;lt;$3)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;grep -in "$1" "$3" | while read LINE&lt;BR /&gt;do&lt;BR /&gt;# Line number for match&lt;BR /&gt;        MATCH_LINE_NO=$(echo $LINE | awk -F: '{print $1}')&lt;BR /&gt;&lt;BR /&gt;        # Check line number boundaries&lt;BR /&gt;        FIRST_LINE=$(($MATCH_LINE_NO))&lt;BR /&gt;        #&lt;BR /&gt;        LAST_LINE=$(($MATCH_LINE_NO + $2))&lt;BR /&gt;                                                                                        if [ "$LAST_LINE" -gt "$TOTAL_LINES" ]&lt;BR /&gt;        then&lt;BR /&gt;        echo match in line $MATCH_LINE_NO, but cannot print lines after $TOTAL_LINES&lt;BR /&gt;                                                                                        fi&lt;BR /&gt;&lt;BR /&gt;        # Print after...&lt;BR /&gt;        LINE_AFTER=$(($MATCH_LINE_NO + $2))&lt;BR /&gt;        cat -n $3 | awk -v lineb=$FIRST_LINE -v linea=$LINE_AFTER '$1==lineb,$1==linea {print $0}'&lt;BR /&gt;                                                                                        echo&lt;BR /&gt;done&lt;BR /&gt;====================================================================&lt;BR /&gt;Appreciate suggestion.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Shiv</description>
      <pubDate>Wed, 20 Dec 2006 13:25:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910407#M97021</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-12-20T13:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910408#M97022</link>
      <description>You are missing the terminating single-quote for the awk construct. The single quote should be placed after the action specified by the END statement...imho change the line below:&lt;BR /&gt;&lt;BR /&gt;from...&lt;BR /&gt;TOTAL_LINES=$(awk '{nlines = nlines + 1}' END {print nlines} &amp;lt;$3)&lt;BR /&gt;to...&lt;BR /&gt;TOTAL_LINES=$(awk '{nlines = nlines + 1} END {print nlines}' &amp;lt;$3)&lt;BR /&gt;&lt;BR /&gt;~hope it helps&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2006 13:42:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910408#M97022</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-12-20T13:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910409#M97023</link>
      <description>Hi Sandman,&lt;BR /&gt;&lt;BR /&gt;now i am getting different error as:-&lt;BR /&gt;`MATCH_LINE_NO=$' unexpected&lt;BR /&gt;&lt;BR /&gt;for the below line in the script:-&lt;BR /&gt;&lt;BR /&gt;# Line number for match&lt;BR /&gt;MATCH_LINE_NO=$(echo $LINE | awk -F: '{print $1}')&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 20 Dec 2006 14:32:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910409#M97023</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-12-20T14:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910410#M97024</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;I'm not sure what you have.  I copy-and-pasted John's script from your post of today (Dec 20).  I corrected line-25 as Sandman pointed out and can run the script without errors and receive the output I expect.&lt;BR /&gt;&lt;BR /&gt;I suggest you re-copy-and-paste and try the same.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 20 Dec 2006 15:12:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910410#M97024</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-20T15:12:03Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910411#M97025</link>
      <description>Hi Shiv,&lt;BR /&gt;&lt;BR /&gt;I copied John's script and it runs perfectly on my machine. As JRF says there is a problem with the copy 'n paste on your end.&lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Wed, 20 Dec 2006 16:04:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910411#M97025</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2006-12-20T16:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910412#M97026</link>
      <description>Now getting new errors.&lt;BR /&gt;&lt;BR /&gt;Here is the messages:-&lt;BR /&gt;&lt;BR /&gt;1st test:&lt;BR /&gt;&lt;BR /&gt;$./t1 "Errors" 5 logfile&lt;BR /&gt;awk: record `java.class.path = /o...' too long&lt;BR /&gt; record number 1653&lt;BR /&gt;match in line 1732, but cannot print lines after 0&lt;BR /&gt;awk: syntax error near line 1&lt;BR /&gt;awk: bailing out near line 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;2nd test:&lt;BR /&gt;$./t1 "listening on port 1000" 5 logfile&lt;BR /&gt;&lt;BR /&gt;match in line 2013, but cannot print lines after 0&lt;BR /&gt;awk: syntax error near line 1&lt;BR /&gt;awk: bailing out near line 1&lt;BR /&gt;&lt;BR /&gt;Looks like some awk syntax errors ??</description>
      <pubDate>Thu, 21 Dec 2006 15:45:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910412#M97026</guid>
      <dc:creator>Shivkumar</dc:creator>
      <dc:date>2006-12-21T15:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Searching Errors in a log file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910413#M97027</link>
      <description>Hi Shiv:&lt;BR /&gt;&lt;BR /&gt;From your output, I would guess that the log file has a record (a string of characters delimited with a newline) that exceeds an 'awk' internal limit.  You might find, too, that you can't 'vi' the file for the same reason.  Perl has no practical limits.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 21 Dec 2006 16:27:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/searching-errors-in-a-log-file/m-p/3910413#M97027</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-12-21T16:27:22Z</dc:date>
    </item>
  </channel>
</rss>

