![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
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 |
| mail from unix | zedex | Shell Programming and Scripting | 6 | 05-01-2008 09:23 AM |
| mail in unix | murad.jaber | SUN Solaris | 1 | 01-07-2008 10:07 AM |
| I am not able to send mail form unix to other mail accounts. | chinnigd | UNIX for Dummies Questions & Answers | 1 | 04-06-2006 08:31 AM |
| can not send mail from unix server to company/yahoo mail | b5fnpct | UNIX for Dummies Questions & Answers | 5 | 11-22-2002 09:24 PM |
| Unix Mail | bobmking | UNIX for Dummies Questions & Answers | 6 | 06-07-2001 04:51 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Unix Mail Box
Hi Friends,
I'm new to Unix. I have a fbackup step like /bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full 2 > /var/adm/error.log the errors for this step is redirected to a log file. How can I make to trigger mails when error occurs. Please suggest. Thanks in adavnce, Avik. |
|
||||
|
Thanks for your reply. But I'm still in the doubt how to send the mail, I mean to say please help me with a sample mail script which will fire on a condition of standard error 2.
/bin/nice /etc/fbackup -f /dev/rmt/0m -i / -I /opt/monitrol/tmp/Index.full 2 > /var/adm/error.log if [ $? eq 2 ] ; then |
|
||||
|
Thanks a lot friend. But to send a mail, how i need to configure my smtp server.
By using like you said if [ $? -eq 2 ] ; then # Make sure you don't put space etc. before the next three lines. Tabs are ok. mailx -s "Test mail" avik.nandi@wherever.com <<-MAIL Error happend in fbackup fi will it work ? Actually, I'm very new to unix and novice, so please help me. Thanks a lot once again. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|