![]() |
|
|
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 |
| search excat string in another string (grep "fails") | bora99 | UNIX for Dummies Questions & Answers | 0 | 06-05-2008 07:41 AM |
| problem with grep on search string in a txt file over multiple files | m00 | UNIX for Dummies Questions & Answers | 2 | 05-18-2008 03:21 PM |
| grep for a search string | raga | UNIX for Dummies Questions & Answers | 11 | 03-12-2008 08:38 AM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| RE error 41: No remembered search string. | unitipon | Shell Programming and Scripting | 1 | 06-19-2007 01:46 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi guys,
I am currently facing a problem with my current script, the script basically monitor a list of process on the Unix system. If a process is down it will send a notification e-mail to me. Currently I am facing an error when running the script grep: RE error 41: No remembered search string, I never seen message before. I've checked Google and it state that you need to remove all grep -q, but I do not have grep -q in my script I only have grep. Can anyone help me please about this message? Thanks guys |
|
||||
|
Quote:
checkProcess () { PROCESS=$1 PROC_NOT_RUN=`$PS -ef | $GREP -i "$PROCESS" | $GREP -v "grep" | $WC -l` #determine how many times are the process is running echo "Process Not Run $PROC_NOT_RUN" return $PROC_NOT_RUN } This is my main funtion, I still not able to find out what was wrong, I have a feeling that when using grep and awk in one line it might cause the problem $CAT $CONF_DEAMON | $AWK '{print $1}' | $GREP -v "^\#" | \ while read SERVICES do SERVICES_PATH=`$CAT $CONF_DEAMON | $GREP -v "^#[[:space:]]" | $GREP "^$SERVICES" | $AWK '{print $2}'` # 1. Check for the process checkProcess $SERVICES if [ $? -eq $SUCCESS ] then echo $? #addErrMSG "$SERVICES is currently not running please review the process under the path of $SERVICES_PATH" #Send_Email fi done Thanks for your help |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|