Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Variable not displaying in subject line of mailx email Post 303037453 by Don Cragun on Thursday 1st of August 2019 04:12:31 PM
Old 08-01-2019
Are you going to tell us that:
Code:
  if [[ $GAPNUM -ge 5 ]] then

isn't your code either?

There are at least two problems here that don't match with your description. If $GAPNUM expands to 0 as you say it does, the mailx won't be executed because zero is not greater than or equal to 5. This statement is also missing a semicolon before the then.
This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

use email subject line as shell command

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)
Discussion started by: mskarica
4 Replies

2. UNIX for Advanced & Expert Users

Unable to send eMail from a UNIX-Host ( using mailx ) to a Outlook-email-addres(Win)

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)
Discussion started by: Vetrivela
2 Replies

3. Shell Programming and Scripting

Email with subject contains value of Variable

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)
Discussion started by: deepsingh
2 Replies

4. Shell Programming and Scripting

Run a script based on the subject line of the email

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)
Discussion started by: satekn
5 Replies

5. Shell Programming and Scripting

executing/including command in mailx subject line

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)
Discussion started by: ozifer
2 Replies

6. Shell Programming and Scripting

help with script to send email and if subject line match is found

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)
Discussion started by: axdelg
2 Replies

7. Shell Programming and Scripting

Subject line of an email

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)
Discussion started by: smarty86
4 Replies

8. Shell Programming and Scripting

Content of attachment is displaying along with subject in mailx

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)
Discussion started by: ROCK_PLSQL
6 Replies

9. Shell Programming and Scripting

Sendemail how to send an email with a subject variable

Hi,:) I try this : #!/bin/bash sender="me@example.com" recipient="you@example.com" subject="TEST FILE" server="0.0.0.0" file=$(cat file.txt) /usr/bin/sendemail -f $sender -t $recipient -u $subject -m $file My file.txt: BLABLALA BLABLABLA (7 Replies)
Discussion started by: Arnaudh78
7 Replies

10. Shell Programming and Scripting

Sending sql output to email body with conditional subject line

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
REPORTER-MAILX(1)						 LIBREPORT MANUAL						 REPORTER-MAILX(1)

NAME
reporter-mailx - Sends contents of a problem directory via email. SYNOPSIS
reporter-mailx [-v] -d DIR [-c CONFFILE] DESCRIPTION
The tool reads a problem directory, composes an email message from the directory contents, and uses mailx to send the message to specified recipient. Properties of email messages can be specified in a configuration file, and via environment variables. Configuration file Configuration file contains entries in a format "Option = Value". The options are: Subject The subject of the email message. EmailFrom The sender of the email message. EmailTo The recipient of the email message. SendBinaryData Use yes/true/on/1 to attach all binary files from the problem directory to the email. This can cause the emails to be very large. Integration with ABRT events reporter-mailx can be used as a reporter, to allow users report problems via email when they decide to do it. This usage is pre-configured in /etc/libreport/events.d/mailx_event.conf: EVENT=report_Mailx reporter-mailx It can also be used to notify administrator automatically when a problem happens. When this is desired, modify the event configuration file to run the tool on the post-create event: EVENT=post-create reporter-mailx OPTIONS
-d DIR Path to problem directory. -c CONFFILE Path to configuration file. When used in ABRT event system, the file contains site-wide configuration. Users can change the values via environment variables. ENVIRONMENT VARIABLES
Environment variables take precedence over values provided in the configuration file. Mailx_Subject Subject of the email message. Mailx_EmailFrom Sender of the email message. Mailx_EmailTo Recipient of the email message. If nor the environment variable nor the corresponding option is defined, the message is send to "root@localhost". Mailx_SendBinaryData Use yes/true/on/1 to attach all binary files from the problem directory to the email. AUTHORS
o ABRT team LIBREPORT 2.1.11 06/18/2014 REPORTER-MAILX(1)
All times are GMT -4. The time now is 02:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy