I am calling a script log.sh from output.sh.
Log.sh has below pice of code:
Output.sh has below pice of code:
However when i am running output.sh i am getting two separate emails with subject Error report and Report.ie output of log.sh(
/home/va59657/log.sh.sh >> $OFILE1)is not going to $OFILE and mail is coming because of sendmail -t command used in log.sh.
When i am removing sendmail -t command in log.sh,html code is coming in email instead of actual output in tabular form from output.sh.
I want only one email with output of log.sh in output.sh mail with subject Report and no two separate emails.
Please help.
Last edited by Vivekit82; 01-30-2014 at 03:00 PM..
You are getting two mails because both of your scripts send mails... You are getting HTML output because your script prints HTML... If you just want the inner script to dump the file to stdout, use cat:
Also, isn't that the awk script you were complaining didn't work in the other thread?
Last edited by Corona688; 01-30-2014 at 03:31 PM..
Thanks.i am using this code as I have only one row in the file..
The other code was perfectly working for all the cases.
But I want HTML output only but through email sent by output.sh.
When I am removing sendmail -t command from log.sh I am getting one email but instead of getting correct HTML output I am getting HTML code printed instead of correct HTML output.
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
...
log_user 1
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
Hi team,
I have a script in different folder. Now i want to call that script and execute that script from that path alone.
My code is
#!/bin/bash
wname=yahoo
PATH='/opt/IBM'
wac=`/usr/bin/ls $PATH | /usr/bin/grep "$wname"`
STOP=`/usr/bin/find $PATH/$wac -type f -name "stop.sh"`... (8 Replies)
Hello I have the file df.tmp
FS is actually the / FS but escape character\ and end of line $ is used in order to fetch exctly / and not other filesystems.
awk '/\/$/ {print $(NF-1)+0}' df.tmp will work properly and return a value eg. 60
but when I am trying to issue the command with the array... (3 Replies)
Hi All,
How do we call a method existing in another file inside awk.
After matching a pattern i want to call a method secureCopy that exists in another file, but method not getting called:
ls -l |
awk -v var2=$servername -v var1=$srcserverpath -v var3=$tgtpath '... (1 Reply)
Hi all,
I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously.
for Keeping... (2 Replies)
Hello,
we can call the script inside another script.
like
method 1) content of test.sh
########
. test2.sh
#######
method 2) content of test.sh
########
test2.sh
#######
What is the difference here in both samples calling test2.sh?? i mean calling with ". " and calling... (1 Reply)
Hi All,
My 1.txt contains some functions
fun1()
....
....
fun2()
....
....
I can call these fun from 2.txt inside awk as below
value="`fun1 "argument1"`"
awk 'BEGIN {printf ("%s", "'"$value"'")}'
I need to modify the above code so that without using the variable to store... (2 Replies)
here's the Perl code snippet...
how can i call my C executable 'porter-stemmer' and pass it $1 as
an argument? Thanks for the help!
# Read through the original topic set, and modify based on the current
# pre-processing options
while (<TOPIC_ORIG>)
{
# Run pre-processing over only the... (3 Replies)