Variable not displaying in subject line of mailx email
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:
Everything works fine except when the email is sent, although $ORACLE_SID value displays, $GAPNUM does not. I've searched on this site and others and am not sure what I'm doing wrong. If I place an echo $GAPNUM just before the mailx line it displays. What am I missing?
Thanks,
Laura
Last edited by Corona688; 07-31-2019 at 06:57 PM..
If anyone can give me some ideas on this it would be great. What I'm trying to do is to have emails be sent to my unix account. Once they are emailed to the unix account, I want to use the text in the subject field to invoke a shell script, so basically I need to find a way that I can... (4 Replies)
Hi
A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as
" usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
I want to email where subject contains value of variable $ORACLE_SID.
When script is emailing, it is not taking value of $ORACLE_SID.
example -
I have variable ORACLE_SID=prd
I am sending email with below script.
tail -1 $LOG | mailx -s 'Export Completed for ${ORACLE_SID}'... (2 Replies)
Hi,
I need help in running a script that would pull info from an email subject line and run a script (foo.sh). I'm pretty sure after a bit of googling that this is possible in several ways. but none was pretty clear on how to accomplish it. The part that I really need help with is getting the... (5 Replies)
Hi,
Is it possible for me to include the results from a command in the subject line? What I am looking to do is get the file count and include it into the subject line as well as the list of files in the body.
Example Subject line: Currently 25 files in directory
My Code:
#!/bin/ksh
cd... (2 Replies)
Help with script that will check log, then find a match is found, add that as the subject line.
1. The script will always run as a deamon.. and scan the event.log file
2. when a new 101 line is added to the event.log file, have the script check position 5,6 and 7 which is the job name, which... (2 Replies)
Hi all,
I am trying to automate a process in which at the end of the process the script should send an email to the user saying this process is completed.
I have done everything but the problem now is the subject line of the email...
the subject line looks like this..
where abc xyz is a... (4 Replies)
Hi All,
I want to send the csv to an email address.
I have tried the below two approaches.
Approach1: Got error -ksh: uuencode: not found
$ uuencode test_file.csv test_file.csv | mailx -s "Attaching test" msdc.kiran@gmail.com </usr/home/test_file.csv
-ksh: uuencode: not found
Approach2:... (6 Replies)
hi ,
i have written below piece of code to meet the requirement but i am stuck in the logic here.
the requirement are:
1) to send the sql out put to email body with proper formatting.
2) if count_matching = Yes then mail should triggered with the subject line ... (10 Replies)
Discussion started by: itzkashi
10 Replies
LEARN ABOUT PLAN9
times
times(1) User Commands times(1)NAME
times - shell built-in function to report time usages of the current shell
SYNOPSIS
sh
times
ksh
times
DESCRIPTION
sh
Print the accumulated user and system times for processes run from the shell.
ksh
Print the accumulated user and system times for the shell and for processes run from the shell.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO ksh(1), sh(1), time(1), attributes(5)SunOS 5.10 15 Apr 1994 times(1)