Sponsored Content
Operating Systems Linux Gentoo inserting grep -c value into an email subject Post 302220775 by mark54g on Friday 1st of August 2008 02:38:41 PM
Old 08-01-2008
Quote:
Originally Posted by Ikon
Code:
n=`grep -c Blocked /var/amavis/amavis.log`

Just for an FYI, those are back ticks, and not single quotes. This is on the same key as ~.
 

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. 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

3. 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

4. Shell Programming and Scripting

Unable to populate subject field of the email while using sendmail

Hi, Can anyone kindly provide some information about how to populate the subject field of the email while using the sendmail utility ? Itried the following command line argument : echo -e "Body of the email" | /usr/lib/sendmail -f from@from.com -t to@to.com -s " Subject of the email" ... (4 Replies)
Discussion started by: sdiptanil
4 Replies

5. 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

6. 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

7. UNIX for Dummies Questions & Answers

Inserting subject for the mails sent through SQR

I am trying to insert subject for the mails sent through one of our sqr process using below code Let $Email_Command = 'uuencode ' || $filename || ' ' || $filename || ' | sendmail -F''' ||$subject || ''' ' ||$mailid1 || ''' ' ||$mailid2 CALL SYSTEM USING $Email_Command #return_code WAIT ... (5 Replies)
Discussion started by: thangaga
5 Replies

8. 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

9. 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

10. UNIX for Beginners Questions & Answers

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: if ]; then export GAPNUM=`awk '{print $4}' $OUTFILE` if ] then mailx -s... (10 Replies)
Discussion started by: ltzwoman
10 Replies
strerr(1M)						  System Administration Commands						strerr(1M)

NAME
strerr - STREAMS error logger daemon SYNOPSIS
strerr DESCRIPTION
strerr receives error log messages from the STREAMS log driver (see log(7D)) and appends them to a log file. The resultant error log files reside in the directory /var/adm/streams, and are named error.mm-dd, where mm is the month and dd is the day of the messages contained in each log file. The format of an error log message is: <seq> <time> <ticks> <flags> <mid> <sid> <text> <seq> error sequence number <time> time of message in hh:mm:ss <ticks> time of message in machine ticks since boot priority level <flags> T : the message was also sent to a tracing process F : indicates a fatal error N : send mail to the system administrator (hardcoded as root) <mid> module ID number of source <sid> sub-ID number of source <text> formatted text of the error message Messages that appear in the error log are intended to report exceptional conditions that require the attention of the system administrator. Those messages which indicate the total failure of a STREAMS driver or module should have the F flag set. Those messages requiring the immediate attention of the administrator will have the N flag set, which causes the error logger to send the message to the system adminis- trator using mail. The priority level usually has no meaning in the error log but will have meaning if the message is also sent to a tracer process. Once initiated, strerr continues to execute until terminated by the user. It is commonly executed asynchronously. FILES
/var/adm/streams/error.mm-dd error log file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5), log(7D) STREAMS Programming Guide NOTES
There is no restriction to the number of strerr processes opening the STREAMS log driver at a time. If a module or driver is generating a large number of error messages, running the error logger will cause a degradation in STREAMS perfor- mance. If a large burst of messages are generated in a short time, the log driver may not be able to deliver some of the messages. This situation is indicated by gaps in the sequence numbering of the messages in the log files. SunOS 5.10 4 Oct 1994 strerr(1M)
All times are GMT -4. The time now is 05:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy