02-08-2008
redirect only the standard error output to mail
Trying to setup rsync backup in the same fashion, but having much more limited knowledge than you gentlemen about shell scripts, can either of you give me an example of the 'finished' script you are talking about that is fully functional?
I am setting up a server that will use the rsync command and ssh to backup from local directories to an account at rsync.net and need to have emails sent to me if it fails.
Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am new in shell scripting.
Can anyone point out what wrong of below script.
If I want the error output to "sqlerror.log"
and database pool data output to "bulk_main.dat".
Right now, the below script, if successful execute, the data will output to
bulk_main.dat && sqlerror.log both... (7 Replies)
Discussion started by: epall
7 Replies
2. UNIX for Dummies Questions & Answers
I have a program that is sending error text to the console and I need to redirect that output to a log file. I'm brand new to Unix and don't know how to do this. Any direction would be greatly appreciated. (1 Reply)
Discussion started by: ndemos
1 Replies
3. Shell Programming and Scripting
Hi all,
Maybe my question is too simple but till now i couldn't figure about a solution :(
I have a bash script scheduled in cron:
<cron time parameters> my_script.sh > result.log 2>&1
By this way i can have standard output and standard error in my result.log file
Now i want my script... (2 Replies)
Discussion started by: Pescator
2 Replies
4. Programming
Hi,
I'm trying to compile the following code:
/************** Begin <test.c> ***************/
/*
* Compiled with: gcc -Wall -o test test.c
*/
#include <stdio.h>
#include <unistd.h>
int main(void)
{
printf("I'm process %d, son of %d \n", getpid(), getppid());
... (5 Replies)
Discussion started by: djodjo
5 Replies
5. Shell Programming and Scripting
Hello,
I would like to know if there is a shell in which operations such as 2| (redirect standard error of one process to the standard input of another one) exist?
I know it is possible to do it in bash with things like:
(process 2>&1) | other_process
but I find it a bit intricate when... (3 Replies)
Discussion started by: chlorine
3 Replies
6. UNIX for Dummies Questions & Answers
Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway?
Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies
7. Shell Programming and Scripting
Hi guys,
i have a script named purgeErrors.ksh, when i execute this script i need to redirect the output to a log file in the same directory, how can i do that ??
-- Aditya (5 Replies)
Discussion started by: chaditya
5 Replies
8. Shell Programming and Scripting
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Discussion started by: aix_admin_007
4 Replies
9. UNIX for Dummies Questions & Answers
Hello.
When I run a .ksh that contains the command below, and there is no file available in the source location the "FILE_NAME_*.CSV not found" error is still being displayed.
FILEN=$(ssh ${SOURCE_SERV} "cd ${SOURCE_LOCATION} ;ls ${FILES}") 2> /dev/null.
This is interfering with the rest... (4 Replies)
Discussion started by: jimbojames
4 Replies
10. Shell Programming and Scripting
Hi Guys,
I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts.
I used below but it is not working:
OFILE=/home/home1/report1
echo "report1 details" > $OFILE
=/home/home1/1.sh > $OFILE
echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
LEARN ABOUT CENTOS
script-email
SCRIPT-EMAIL(8) System Administration Commands SCRIPT-EMAIL(8)
NAME
script-email - Amanda script to send email notifications
DESCRIPTION
script-email is an Amanda script implementing the Script API. It should not be run by users directly. It sends a notification email to the
addresses specified in the MAILTO property.
PROPERTIES
This section lists the properties that control script-email's functionality. See amanda-scripts(7) for information on the Script API,
script configuration.
MAILTO
List of email addresses that will receive an email on command execution. It is a multi-valued property:
property "MAILTO" "amanda@domain.com" "sysadmin@domain.com" "amandauser@domain.com"
EXAMPLE
In this example, script-email is scheduled to be run before the DLE, on the server. The unqualified email address amanda will be passed to
the email system unchanged. The script is then attached to a dumptype, which can then be specified for any DLEs which require
notification.
define script-tool pre-email {
comment "email me before this DLE is backed up"
plugin "script-email"
execute-on pre-dle-backup
execute-where server
property "mailto" "amanda"
}
define dumptype user-tar-email {
user-tar
script "pre-email"
}
SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHORS
Jean-Louis Martineau <martineau@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Dustin J. Mitchell <dustin@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.3 01/10/2013 SCRIPT-EMAIL(8)