The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-05-2007
ocelot ocelot is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 31
I have tried grep -c but that doesnt work either, it keeps on dumping out.

The script is actually a TCL script with embedded UNIX commands. The part its failing on is like so:

set td [exec grep -c "InvalidMessage" $logdir/$t | wc -l]

(I have assigned the variables logdir and t from before)

and i run the script and this occurs:

child process exited abnormally
while executing
"exec grep -c "InvalidMessage" $logdir/$t | wc -l"


It happens because there are no "InvalidMessage" strings in the file, but I know this and want the result i.e. 0 to be assigned to td