Sponsored Content
Top Forums Shell Programming and Scripting AIX .ksh script freezes when using the mail -s command Post 302531448 by jimbojames on Thursday 16th of June 2011 08:08:18 PM
Old 06-16-2011
Thanks fpmurphy

I have looked through the man for mail, and have attempted to modify the command to the following:

Code:
 mail -s "%d files found in %s\n" "$numfiles" "$dir" -c $ADMIN

I believe that this is correct now, but it is still failing to send and I have to cancel the command with a Ctrl + c.

Being completely new to (and apparently useless with) UNIX, I can not see what I am doing wrong. Do you have any other suggestions?
 

10 More Discussions You Might Find Interesting

1. AIX

AIX server freezes on bootup

Issue: AIX server freezes on bootup. Server AIX ver 4.3.3.0 When the AIX server reboots it negotiates NIS. During startup of NFS, customer gets one or more of the following error messages: 0513-056 Timeout waiting for command response. If you specified a foreign host, see the /etc/inittab file... (1 Reply)
Discussion started by: srzaman1
1 Replies

2. UNIX for Dummies Questions & Answers

command completion in .sh or .ksh in AIX environment

How do you user command completion in .sh or .ksh in AIX environment? I know you can do it by hitting <esc><esc> in bash, but how do you do it in bourne or korn shell in AIX 5.3 environment? Thanks in advance. (1 Reply)
Discussion started by: pdtak
1 Replies

3. AIX

How to mail the output of a command in AIX

Hi, I have mastered how to mail to Windows in AIX. Can anyone tell me how I would mail the output command df -g to an email? I want to set a job in cron to mail df -g as the contents of a mail. Any ideas? Thanks John (4 Replies)
Discussion started by: jfd7000
4 Replies

4. Shell Programming and Scripting

Mail cleanup from ksh script, keeping 50 most recent msgs

I found some posts describing how to completely clean out a mailbox in Unix/Linux. But I want to keep the 50 most recent messages. Any ideas out there? Thanks! (3 Replies)
Discussion started by: OPTIMUS_prime
3 Replies

5. UNIX for Dummies Questions & Answers

AIX: mail command & server

Hi, I have to change the mail server, but I could not find the file where it is written in. I use the following command: </> echo krneki | mail -v -s "New report" receiver@our.comp Server name ("skala") can be seen in a terminal output .... receiver@our.comp ... Connecting to... (0 Replies)
Discussion started by: frajer
0 Replies

6. Shell Programming and Scripting

Calling SQL script from ksh job and send mail on some error.

Hi, I am trying to call sql script from ksh job with parameters.The parameters passed from ksh job will be used in SELECT query in sql file to SPOOL the data in extract file.My questions are: 1) How to call a sql script from ksh job with parameters? 2) How to use the parameter in sql file to... (1 Reply)
Discussion started by: anil029
1 Replies

7. Shell Programming and Scripting

Help extracting process name from ps command AIX using KSH

Hi All, Newbie script writer and I need some help! I'm grepping ps - eno THREAD >outfile This gives me loads of stuff including the proc names which appear at the end of the line. They're all 10 characters long so what I want to do is cut them (and only them) from the file and put it in... (7 Replies)
Discussion started by: Grueben
7 Replies

8. Shell Programming and Scripting

Aix .ksh for loop script.

Hi, I'm trying to write a for loop to run through a list of servers and for each server copy a file to a backup file. But I can't seem to get it to run through my server list. It work for individual servers, please see below. #!/bin/ksh SSH_USERID=khcuser webservers="server1 server2" ... (2 Replies)
Discussion started by: elmesy
2 Replies

9. Shell Programming and Scripting

AIX-ksh script ends unexpectedly

Hi, I have a ksh script running on AIX 5.3 which has sometimes a bizarre behaviour. The script runs a child script like follow. trap 'rm -f /tmp/res.log;exit 0' 2 15 run_child.sh > /tmp/res.log 2>&1 echo "run_child.sh is terminated" next instructions... rm -f /tmp/res.log ... (12 Replies)
Discussion started by: rivalgro
12 Replies

10. Shell Programming and Scripting

[Solved] AIX ksh script -d <- what does it mean?

I'm looking at a line in a script: && DRROOT="/dir1" || DRROOT="/dir2" I'm trying to understand it. Is there a "-d" command and is it seeing if /dir1 exists and, if so, set an environment variable named DRROOT to "/dir1", else set DRROOT to "/dir2" ? Thanks, -dog ---------- Post... (0 Replies)
Discussion started by: landog
0 Replies
CANCELMSG(1)						      Double Precision, Inc.						      CANCELMSG(1)

NAME
cancelmsg - Cancel an E-mail message SYNOPSIS
cancelmsg {msgid} ["reason"] DESCRIPTION
cancelmsg removes a message from the mail queue. There will be no more attempts to deliver this message, and a standard delivery failure notice is sent to the return address listed on the message. You can only cancel your own messages. The superuser can cancel any message. An attempt to cancel a message will fail if the message has already been sent (of course), or if a delivery attempt is currently in progress. Because a delivery attempt is usually started as soon as an E-mail message is added to the mail queue, a cancellation attempt is only effective if the message cannot be immediately delivered for some reason, or if the system is very busy and is working on a mail backlog. cancelmsg works by marking all pending recipients as undeliverable. A non-delivery report is then generated and sent in the normal fashion. msgid is the message queue id that can be obtained from the mailq(1)[1], command. A reason is optional. The message does not disappear into a black void. The message will be returned as undeliverable, citing reason. A generic error message will be used if reason is not specified. BUGS
A non-delivery report may not be sent immediately, but delayed until the message's turn comes up in the scheduling queue. There is no immediate indication if the message cancellation worked. A subsequent non-delivery report is the only indication of a successful cancel. If it doesn't come, it means the message wasn't cancelled in time. A non-delivery report will not be sent for recipients whose delivery status notification does not include the FAIL notice. SEE ALSO
mailq(1)[1], courier(8)[2]. AUTHOR
Sam Varshavchik Author NOTES
1. mailq(1) [set $man.base.url.for.relative.links]/mailq.html 2. courier(8) [set $man.base.url.for.relative.links]/courier.html Courier Mail Server 08/30/2011 CANCELMSG(1)
All times are GMT -4. The time now is 04:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy