Sponsored Content
Top Forums Shell Programming and Scripting How to automatically send a mail alert if the script errors out Post 302383421 by TonyFullerMalv on Tuesday 29th of December 2009 03:56:09 PM
Old 12-29-2009
The "||" means only run what is after the "||" if the code before the "||" fails, the opposite is "&&" which means only run what is after the "&&" if the code before the "&&" has succeeded, e.g.:
Code:
cp fred /var && rm fred

Only delete fred if it was successfully copied to /var.
This User Gave Thanks to TonyFullerMalv For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Send mail with attachments automatically in a interval period

hai everyone I want to send mail with attachments automatically for every 15 minutes getting different E-mail IDs from a file if any script is available , Please send to me .. This will be very useful for my project.... Thanks for your time..... Felix ... (3 Replies)
Discussion started by: Leo Felix
3 Replies

2. Linux

Unable to send mail - but no errors found :-(

Hi Guys I am using this version of Linux box (as shown below). I am unable to send email from the box. But I am not getting any errors while sending email. :mad: Any idea what could be the reason? What entry should I check? :confused: $ uname -a Linux machine-name 2.4.21-144-smp4G #1... (6 Replies)
Discussion started by: csaha
6 Replies

3. Shell Programming and Scripting

need to send alert mail

hi, i need to monitor a cron job that runs every 5 mins. if this cron job does not process the request for more than 6 hrs, an alert mail should be sent. how do i achieve this?? (1 Reply)
Discussion started by: smurala
1 Replies

4. Shell Programming and Scripting

how to send mail automatically in unix

Dear friends, I am storing daily some data in a tape disk. and numbering it from 1 2 3 like this. I want to get alert mail automatically when ever data is greater than or equal to 600. to my yahoo mail. i want to put that mail script in crontab so it will check the data daily at... (7 Replies)
Discussion started by: rajan_ka1
7 Replies

5. Shell Programming and Scripting

How to use SSH to connect to Primary DB and send alert mail

Hi All, AIX 5.3 64 bit: I am using the below shell script the objective is: Objective: ======== Use SQL*Plus to query the MAX(SEQUENCE#) from both databases V$LOG_HISTORY view. If the STANDBY appears to be falling behind,then send alert mail through the below shell script: How... (0 Replies)
Discussion started by: a1_win
0 Replies

6. Shell Programming and Scripting

Poll for a file. If not present...Send a alert mail

Dear Experts, I have a requirement where a 3rd party system places a file in my folder.I am running on HP UNIX. I would like to have a unix script which will check for the existence of the file. If yes OK. if the file is not placed then it has to send a mail to couple of emails ids saying that... (3 Replies)
Discussion started by: phani333
3 Replies

7. Shell Programming and Scripting

how to write a shellscript to send a mail alert to the website user based on license expiration time

hi, i am very much new to shell scripting i have a requirement that i have to develop a License Renewal Alert system that has to give a alert mail to the users before 30days of user account expiration, by checking expiration date of the user with the data base, this system will... (0 Replies)
Discussion started by: deepu_Shscripts
0 Replies

8. Shell Programming and Scripting

Shell script to send mail alert

HI Guys, I am writing one shell script to send the mail alert to some email id's if the file not modified in last 10 mins but its not working, I believe MTIME is null string is wrong . can you please assist me on this. script :- filename="abc.txt" echo "Filename is $filename"... (1 Reply)
Discussion started by: abhigrkist
1 Replies

9. Shell Programming and Scripting

Run a script before and after reboot automatically and send output to two locations.

Hello Team . I am working a health check script ( bash) to run on linux server ( RedHat) and requirements are 1. The o/p of script need to be send to two diff files . I am testing with tee command . But I am not successful yet , any recommendations if that is the right approach ? 2. The same... (2 Replies)
Discussion started by: Varja
2 Replies

10. UNIX for Beginners Questions & Answers

Shell script to send mail alert

Hi I have below shell script to send mail alert , however I want to add more functionality in this script and that is , script should only check that file between 9 am to 5pm , and if there is no activity in this time 9 am to 5 pm for 2hours then it should give me mail alert, please help... (2 Replies)
Discussion started by: scazed
2 Replies
EDVIPS(1)						      General Commands Manual							 EDVIPS(1)

NAME
edvips - edit header of a vips image file SYNOPSIS
edvips [OPTION...] vipsfile DESCRIPTION
edvips alters a VIPS image file's header. This is useful for setting the resolution, for example. The options are: -x, --xsize=N set Xsize to N -y, --ysize=N set Ysize to N -b, --bands=N set Bands to N -f, --format=F set BandFmt to F (eg. uchar) -i, --interpretation=I set Interpretation to I (eg. xyz) -c, --coding=C set Coding to C (eg. labq) -X, --xres=R set Xres to R pixels/mm -Y, --yres=R set Yres to R pixels/mm -u, --xoffset=N set Xoffset to N -v, --yoffset=N set Yoffset to N -e, --setext replace extension block with stdin Be very careful when changing Xsize, Ysize, BandFmt or Bands. edvips does no checking! EXAMPLES
To set the Xsize to 512 and Bands to 6: edvips --xsize=512 --bands=6 fred.v or edvips -x 512 -b 6 fred.v Extract the XML metadata from an image with header(1), edit it, and reattach with edvips(1). header -f getext fred.v | sed s/banana/pineapple/ | edvips -e fred.v RETURN VALUE
returns 0 on success and non-zero on error. SEE ALSO
header(1) COPYRIGHT
K. Martinez 1993 30 June 1993 EDVIPS(1)
All times are GMT -4. The time now is 12:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy