07-16-2008
Using mail command to notify the status of script
Should I save the value of $? after every command like mount, umount and use the code u suggested before each of the mail commands? Can u plz. be more descriptive ? Thanks again.
Last edited by mbak; 07-16-2008 at 09:52 PM..
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi all..
i need any help. i want to create in my crontab a simple script for verify any process and notify for the status in my e-mail or cell phone.
anybody help me? (9 Replies)
Discussion started by: squash
9 Replies
2. Shell Programming and Scripting
How to capture output or numeric part given by $? command into the variable?
If I go for
var=`$?`
then $var is found empty. (2 Replies)
Discussion started by: videsh77
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am using the NOTIFY command and I am getting the emails.. I tried MAILX and e-mail is being sent. I want to use NOTIFY to see if my jobs are completed or not. Am I missing something..
All your ideas are greatly appreciated..
Thanks
Venky (2 Replies)
Discussion started by: venkyA
2 Replies
4. Shell Programming and Scripting
Hi Experts,
I am trying to write a ksh script that it should notify in case there is no response from the other script. I mean to say that I got a.sh and b.sh
the execution of b.sh depends on a.sh, so if there is no response from a.sh,
b.sh should notify me about the same.
Thanks in Advance (4 Replies)
Discussion started by: rajusa10
4 Replies
5. UNIX for Dummies Questions & Answers
rshstatus=`rsh -n lilo /db/p2/oracle/names9208/restart_names.sh`
if $rshstatus <>0 then
errstatus=1
mailx -s "xirsol8dr" ordba@xxx.com >> $log_dr
else if errstatus=0
echo "status to xirsol8dr successful"
can anyone provide if this is t he correct way to do this or is there a better way? (1 Reply)
Discussion started by: bpm12
1 Replies
6. Shell Programming and Scripting
Hi,
I am having a little trouble getting notify-send to work the way I would like it to.
I am using ubuntu - karmic koala 2.6.31-19-generic #56-Ubuntu SMP
So here's the problem
run the following commands one after the other.
notify-send -i info -t 100000 -- "Hi" "world" &
notify-send -i... (3 Replies)
Discussion started by: linuxpenguin
3 Replies
7. Shell Programming and Scripting
I am planning some tasks that I need send mails regularly to my team members. I think to use cronjob with script to do it.
Two init files are prepared, I can change the format if you ask for.
name.txt:
Bill bill@xxx.com
Peter peter@xxx.com
James james@xxx.com
Tasks_list.txt
... (4 Replies)
Discussion started by: newoz
4 Replies
8. Shell Programming and Scripting
Hi all,
I have a shell script inside which i am executing another shell script. In the inner script im executing a command. i want the status of that command in the outer script to perform some validations.
How to get its status please help!!1
Im using ksh. (2 Replies)
Discussion started by: Jayaraman
2 Replies
9. Shell Programming and Scripting
Hi All
I am trying to write a shell script that will notify via email if a particular service is down. What I have so far is a script in cron like his:
#!/bin/sh
cd /usr/jdk/instances/jdk1.6.0/bin/sparcv9
jps -m
And the output of the above is
81529 Jps
52988 TaskControllerService... (5 Replies)
Discussion started by: fretagi
5 Replies
10. Shell Programming and Scripting
Hi,
The script below works okay and emails me the log in the end once the script completes but what I'm trying to do is to also notify me via an email as soon as the script encounters any error whatsoever.
cat test.list
hdisk0 00a6351a2c832da1 rootvg ... (7 Replies)
Discussion started by: mbak
7 Replies
LEARN ABOUT DEBIAN
xfm_dev
XFM_DEV(5) XFM XFM_DEV(5)
NAME
/etc/X11/xfm/xfm_dev - xfm device configuration
DESCRIPTION
When starting xfm(1) - the X file and application manager - reads this file to determine mount and umount commands for specific directo-
ries.
FORMAT
One entry per line. Lines starting with a hash (#) and empty lines are ignored. Each line consists out of three or four fields, separated
by colons (:). Backslashes and colons within those fields have to be escaped using backslashes.
FIELDS
directory
The first field describes which directory this entry is about. If this this directory or and child directory of this is opened, while no
other one is open, the mount command is executed. If the last file window showing this directory or a child thereof, the unmount command is
executed.
This field can also be the special string GETFSENT, which is described in a special paragraph below.
mount command
The second field is the command to execute for mounting. It is given the shell as one argument after a -c.
unmount command
The third field is the command to execute for unmounting. It is given the shell as one argument after a -c.
icon
The fourth field is optional. It is only used to specify an icon for the 0 No icon field is equivalent to an icon field containing
dev_disk.xpm, which differs from an empty icon field. (See xfm(5)).
automatic configuration via GETFSENT
If the first field of an entry is the special string GETFSENT, and the systen xfm was compiled on had a fstab.h file, the getfsent(3) func-
tion is used to get mount point information.
Every mount point which contains a mount option starting with user. (like user, or users) for which no specification does yet exists is
added to the list.
mount and unmount command
These commands are expanded with a space and the directory in question and the result is handled a in the normal case. This needs some
fixing with directories containing spaces.
icon field
The icon field can in this case be appended by an arbitrary number of rules of the form
,fstype=iconname
If the filesystem has type fstype, the icon iconname is used instead.
EXAMPLES
/media/cdrom:mount /media/cdrom:umount /media/cdrom:cdrom.xpm
/floppy:mount /floppy:umount /floppy
GETFSENT:mount:umount:dev_disk.xpm,iso9660=dev_cdrom.xpm,ext2=bla.xpm
FILES
$HOME/.xfm/xfm_dev
Unless otherwise specified in the X resources, this is the first location xfm looks for this file.
/etc/X11/xfm/xfm_dev
Unless otherwise specified in the X resources, this file is tried when the previous could not be read.
/etc/fstab
This is the file getfsent most likely gets its information from.
SEE ALSO
xfm(1), mount(8), getfsent(3).
xfm 20 April, 2006 XFM_DEV(5)