To get your $BODY text to span multiple lines try using a here document, e.g.
It looks to me like the closing backtick should be after the EOF 2>/dev/null, but
why do you want backticks around the mailx anyway?
I am using a popular HOSTUMP script that dumps successfully to a log file named
servername_a_`date +%m%d%y`.log
I then want to kick off a second cron job that will email me that log. I am assuming it has to be something like
00 07 * * 2 mailx -s 'SERVERNAME Tape A Weekly Backup Log'... (1 Reply)
I'm trying to write a simple script program (C shell). I have a problem redirecting input into a variable. Say I have a variable called J, and there is file called result which contains just some number, say 5. Which command should I use to assign J value 5 from the file result. I tried the... (2 Replies)
Hi guys,
I want to input some variables from a file.
I tried it with following script,
for i in 1 2 3 4
do
read varible1 varible2 < ddd.txt
echo $varible1 $varible2
done ... (1 Reply)
Hi all,
I need to send a variable value in the script through mailx. Please find the script below but its not working.
agents.sh:
agents=`grep "Tot Agents " snapshot.dbm`
if (( $? == 0 )); then
mailx abc@gmail.com $agents
fi (3 Replies)
Suppose we have a simple situation, like the following C++ instructions:
int x;
cout << "Insert x: ";
cin >> x;
while ( x-- < 0 ) ;
Of course, if it is written something different from an integer, the while loop shall not end.
So, how can we check if the input x is of the right type? (2 Replies)
Hi,
I am trying to send email with attacment and body using "mailx"
(cat body.txt; uuencode attach.txt) | mailx -s "Attachment" abc@xyz.com
When i type this command, the shell is still waiting for me to enter something in standard input and press control D before it sends a mail and... (2 Replies)
Dear All ,
i stuck in one problem executing xml .. i have input xml as
<COMMAND name="ARRANGEMENT.WRITE" timestamp="0" so="initial">
<SVLOBJECT>
<LONG name="CSP_PMNT_ID" val="-1"/>
<MONEY name="CSP_CEILING" amount="0.0" currency="AUD"/>
... (6 Replies)
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Hi all,
Using shell script i need to send this report to the user. The department number will be mentioned every time in the input file as an input. I am not sure how to write a script by taking the department number from the text file.
select * from account where department in... (1 Reply)
Hi
Newbie here with first post. I've got a shell script (ksh) whereby I run a SQL*Plus script and output the results to a file. I then check the output file in an if statement that looks like this:
if ]; then
export GAPNUM=`awk '{print $4}' $OUTFILE`
if ] then
mailx -s... (10 Replies)