![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | 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. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shell script to search for text in a file and copy file | imeadows | UNIX for Dummies Questions & Answers | 9 | 11-12-2008 09:12 PM |
| search for the contents in many file and print that file using shell script | cdfd123 | Shell Programming and Scripting | 3 | 10-07-2007 10:17 PM |
| how to search string and number in one file and check in the other file | knshree | Shell Programming and Scripting | 9 | 08-24-2007 04:29 AM |
| How to search a pattern inside a zipped file ie (.gz file) with out unzipping it | senraj01 | Shell Programming and Scripting | 2 | 04-26-2006 04:32 AM |
| Jar File Search! | pjanakir | Shell Programming and Scripting | 2 | 09-15-2005 01:40 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
search log file
hi, I know this question probably been asked a thousand times but I can't find any posts that can help me out, so here I am. The problem is at the end of the day I want to execute a script but I only want to invoke it if and only if scripts 1/2/3/4/5/6 executed successfully. So what I did is to write the exit status for each script to their corresponding log file with message like "000 upload complete" for successful upload or "999 upload failure" for error. I want to script another script to search through these log files to see if they have at least one "000 upload complete" and absolutely no "999 upload failure". THANK YOU THAN YOU!
|
|
||||
|
search log
if [ `grep "999 upload failure" log1 log2 log3 log4 | wc -l` -gt 0 ]
then echo fail fi |
| Sponsored Links | ||
|
|