|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
grep in Shell script
Hello
I do want to write a script which will check any errors say "-error" in the log file then have to send email to the concern person . And the concern person will correct the error . Next time if the script runs eventhough the error has been corrected it will send the email . Also one more thing when ever transactions haappened system writes date as well in the log file How do I write a script ? . I am using LINE_FOUND=`grep '"error"' /$LOGNAME/logdir/socket.log | grep -v "grep" | grep - "sh -c" Thanks Krishna |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
Can we see a mockup of the the line of the logfile? When I see grep -v grep and grep - it seems like you have been at this too long.
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grep in Shell script | ap2112 | Shell Programming and Scripting | 5 | 01-20-2011 10:38 AM |
| Shell Script with Grep | DallasT | Shell Programming and Scripting | 2 | 06-02-2010 11:55 AM |
| How to grep sql error in shell script and exit the script? | allinshell99 | Shell Programming and Scripting | 2 | 05-27-2010 09:06 PM |
| Shell script grep help | shriyer | Shell Programming and Scripting | 11 | 08-03-2009 11:35 AM |
| Using Grep in a Shell Script | nbvcxzdz | Shell Programming and Scripting | 8 | 03-19-2005 04:21 AM |
|
|