I have a script which counts how many times a job has failed.
For some reason my echo $list wont work in a variable, it works if i dont put it in a variable, but i need this in a variable so i can do a grep -c against another file.
Any help would be appreciated.
cat /apps/tech/testruniquefailures | while read list ; do
Num=`grep -c $JOBNAME /apps/tech/testfailures1`
if [ $Num -gt 0 ] ; then
print $JOBNAME has failed $Num times >> /apps/tech/jinfo.txt
This is the output with debug
++ grep -c /apps/tech/testfailures1
+ [ - -gt 0 ]