Originally Posted by chrism01
You've got an extra character at the start of the first one
I also recommend using the 'set' debug cmd as the 2nd line thus
That "]" was not there.
-bash-3.2$ sudo ./server1-weekly_2nd
if ps -ef | grep server1-backup ; then
mailx -r firstname.lastname@example.org "SERVER1 Weekly Backup still running!"
mailx -r email@example.com -s "SERVER1 Weekly Backup COMPLETED!"
+ ps -ef
+ grep server1-backup
root 27447 1 1 13:34:52 ? 3:32 bpbkar -r 2678400 -ru root -dt 0 -to 0 -clnt server1-backup -class server1_
root 14894 14892 0 13:59:02 pts/25 0:00 grep server1-backup
+ mailx -r firstname.lastname@example.org 'SERVER1 Weekly Backup still running!'
The flags you gave are used only when sending mail.
Usage: mailx -eiIUdFntBNHvV~ -T FILE -u USER -h hops -r address
-s SUBJECT -f FILE users
I got above error when I entered "set -xv"
BUT WHEN I RUN THIS SCRIPT I GET BACKUP COMPLETD MAIL QUICKLY EVEN THOUGH BACKUP IS STILL RUNNING.I MEAN TO SAY EVEN THOUGH BPBKAR SHOWING IN ps -ef output.