I am trying to put the names of the jobs that fail in the subject of the mail message. Any help would be greatly appreciated!!
FAIL=`grep FA test | wc -l `
if [ $FAIL -ne 0 ]
then
FAILURES=`grep FA test | awk '{print $1;}'`
grep FA test | awk '{print $1;}' | mailx -s "The Following Job(s) Have Failed $FAILURES"
This script currently will only print the first line of the output in the subject line, however I would like to include all job failures.
FAIL=`grep FA test | wc -l `
if [ $FAIL -ne 0 ]
then
FAILURES=`grep FA test | awk '{print $1;}'`
grep FA test | awk '{print $1;}' | mailx -s "The Following Job(s) Have Failed $FAILURES"
This script currently will only print the first line of the output in the subject line, however I would like to include all job failures.