10 More Discussions You Might Find Interesting
1. Programming
In shell scripting, I can create a conditional statement based on the success or failure (exit status)of a command such as:
pinger()
{
ping -c 2 $remote_host >/dev/null 2>&1
ping_stat=$?
}
pinger
if ]; then
echo "blahblahblah"
exit 0
fi
how is this done using Python using... (3 Replies)
Discussion started by: metallica1973
3 Replies
2. UNIX for Dummies Questions & Answers
How do i check success status of a sed command execution i have the below script not sure if it is right approach to check status of execution using a function.
Also it looks like in the below sed command even if the search string doesn't exist in the file it is returning status as success as i... (6 Replies)
Discussion started by: Ariean
6 Replies
3. Red Hat
Using RHEL 5.5
New to using 'mailx'
Was trying to check if mailx is configured.
mailx command gives a list of unread mails.
Now I tried to send mail using this command to a local or on network machine using
mailx -s "Test2" "root@<servername>"
But did not receive any message. (6 Replies)
Discussion started by: ikn3
6 Replies
4. UNIX for Dummies Questions & Answers
Guys,
Is it possible to get a delivery status message like success/faliure notification after sending a mail using mailx.
-v option can be used to get the message failure notification if any..
is there any option to get the message success notification? (0 Replies)
Discussion started by: manoharg
0 Replies
5. Shell Programming and Scripting
( cat textfile.txt; ) | mailx -s "test mail " `cat mailids.lst`
from :'server@example.com'
to : for all contacts in text file mailids.lst
above command is sending mails correctly for all contacts in text file mailids.lst, but 'from' address is showing as 'server@example.com' but i want... (5 Replies)
Discussion started by: only4satish
5 Replies
6. Shell Programming and Scripting
Hi,
I am running a shell script which will spawn the telnet and login.
But sometimes, the telnet session itself is not getting spawned.
My requirement is, if the telnet session is not spawned, the user must be notified that it failed.
Is there any command to capture the status of telnet... (2 Replies)
Discussion started by: merin
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
Want to log the output of command & check the exit status to find whether it succeeded or failed.
> ls abc
ls: abc: No such file or directory
> echo $?
1
> ls abc 2>&1 | tee log
ls: abc: No such file or directory
> echo $?
0
Tee commands changes my exit status to be always... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies
8. Solaris
Dear all,
Every time if i use mailx it is asking for entering the From Address.
I want to set it in some place, So that it will take it by default whenever we send mails.
Pl help on this.
Regards
JeganR (2 Replies)
Discussion started by: jegaraman
2 Replies
9. Shell Programming and Scripting
Hi All,
Can anyone please provide the command for sending an mail with attachment using mailx command.
Thanks in Advance :)
Regards,
Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies
10. UNIX for Dummies Questions & Answers
Hi there
I am using mailx command to send mails. I want to send some important files to team members and wud like to know if the team member has recd my email or not.
How can I achieve this ?
Currently my piece of code is
uuencode ${FILE_NAME} ${FILE_NAME} >> mail_msg.txt
mailx -s"test... (5 Replies)
Discussion started by: Amruta Pitkar
5 Replies