10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Guys,
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
2. Red Hat
Dear Concern,
We use following mail command in a script. We want to modify below command in script so that we can set mail as CC, BCC and From field of mail also can be modified. Please suggest.
echo "The SFTP user account '"$username"' will be expired soon. If you want to extend your... (1 Reply)
Discussion started by: makauser
1 Replies
3. Shell Programming and Scripting
Hi All,
I'm having some problems with my shell script. When running the script I get the following errors:
line 101: <html>: command not found
line 105: /dumpfile.txt: No such file or directory
The file dumpfile.txt does exist and I have double and tripple checked this. I'm not sure... (14 Replies)
Discussion started by: SalientAnimal
14 Replies
4. UNIX for Dummies Questions & Answers
Hi ,
How to send e-mail from shell script ( C shell ) . Mailx command is not working ( It didn't giving error also ). Please help me (2 Replies)
Discussion started by: arukuku
2 Replies
5. Shell Programming and Scripting
i have written a simple script to print the out of a command and send an mail but i am not getting a shell output here .please see my script
present output is like this i need an output as same as shell
Postfix log summaries for Jan 24 Grand Totals ------------ messages 1432 received 1439... (2 Replies)
Discussion started by: unimaxlin
2 Replies
6. Shell Programming and Scripting
Hi All,
I want to send mail to multiple users..
Currently I am using below script
cat $STATUS_FILE|mailx -s "$SUBJECT" -r xxx@yyy.com $MAILTO
How can i give cc or bcc to in this script
Please help me
thanks in advance
Regards
RG (3 Replies)
Discussion started by: rgumm
3 Replies
7. Shell Programming and Scripting
Hi all,
Currently in shell script i am using the following command to send mail
echo "Certain assets are not loaded properly. PFA the result of the DataLoad" | mail -s "Weekly DataLoad - Failure Notification !!" $MAILINGLIST
I need to attach a file along with that. How should i handle this... (7 Replies)
Discussion started by: ananthi_ku
7 Replies
8. Shell Programming and Scripting
Hi,
I need a shell script which runs in the backround for all the 24 hours and send a mail to us regarding the output of the prstat command when the load average increase above certain percent.
kindly help me on this...... (1 Reply)
Discussion started by: jayaramanit
1 Replies
9. Shell Programming and Scripting
Hi..
How can i use mailx,mail command in Shell Script.
Suppose i gave a condition that x value is above 25 send a mail alert to abc@rediffmail.com.
How can i do this?
Regards
Sollin (16 Replies)
Discussion started by: sollin
16 Replies
10. UNIX for Dummies Questions & Answers
I am using aix 5.1
I am trying to put a line in a command script to e-mail myself when a command is done.
I am not sure what that is . Could somebody help me ?
Thanks (2 Replies)
Discussion started by: rocker40
2 Replies
escape(1) Mail Avenger 0.8.3 escape(1)
NAME
escape - escape shell special characters in a string
SYNOPSIS
escape string
DESCRIPTION
escape prepends a "" character to all shell special characters in string, making it safe to compose a shell command with the result.
EXAMPLES
The following is a contrived example showing how one can unintentionally end up executing the contents of a string:
$ var='; echo gotcha!'
$ eval echo hi $var
hi
gotcha!
$
Using escape, one can avoid executing the contents of $var:
$ eval echo hi `escape "$var"`
hi ; echo gotcha!
$
A less contrived example is passing arguments to Mail Avenger bodytest commands containing possibly unsafe environment variables. For
example, you might write a hypothetical reject_bcc script to reject mail not explicitly addressed to the recipient:
#!/bin/sh
formail -x to -x cc -x resent-to -x resent-cc
| fgrep "$1" > /dev/null
&& exit 0
echo "<$1>.. address does not accept blind carbon copies"
exit 100
To invoke this script, passing it the recipient address as an argument, you would need to put the following in your Mail Avenger rcpt
script:
bodytest reject_bcc `escape "$RECIPIENT"`
SEE ALSO
avenger(1),
The Mail Avenger home page: <http://www.mailavenger.org/>.
BUGS
escape is designed for the Bourne shell, which is what Mail Avenger scripts use. escape might or might not work with other shells.
AUTHOR
David Mazieres
Mail Avenger 0.8.3 2012-04-05 escape(1)