Please mention what Operating System and version you have and what Shell you are using.
Most versions of "mail" read the contents of the mail body from standard input. Your script is probably waiting for someone to type. Though I can't vouch for your syntax for "mail" (particularly the %d and %s bit), providing "mail" with some input usually cures the "hang" issue:
Just for interest, you'd probably have to type the end-of-file control code (usually ctrl/D) to get out of the original hang.
Afterthoughts:
On many systems the command would be "mailx" not "mail".
I guess that the %d and %s are misplaced "printf" syntax.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)