Sponsored Content
Top Forums Shell Programming and Scripting Adding date to the subject using mailx Post 302484859 by m.d.ludwig on Monday 3rd of January 2011 12:54:52 PM
Old 01-03-2011
I tried a simple test:
Code:
echo "SQL ... on `date` due to ..."

and got:
Code:
SQL ... on Mon Jan  3 12:51:02 EST 2011 due to ...

Can you provide additional details? More of your shell script, etc etc.

Also, I would like to suggest you use:
Code:
echo "SQL ... on `date '+%Y-%m-%d %H:%M:%S %Z'` due to ..."

because it is much easier to sort when your subject lines reads something like:
Code:
SQL ... on 2011-01-03 10:53:04 MST due to ...

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mailx in cron using variable date

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)
Discussion started by: seaquin
1 Replies

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

3. Shell Programming and Scripting

How to extract the subject from a script which uses mailx

Hi, I need to extract the subject of an e-mail sent using mailx. mailx is in a a file and the command reads like the following Ex: sendMail.sh mailx -s ' This is the subject' $recepiant note that anything can come within ' ' which goes to the subject. Please help (5 Replies)
Discussion started by: mwrg
5 Replies

4. Shell Programming and Scripting

adding hostname and date in subject of the mail

Hi Team, I coded my code to send mail to some reciepents with subject and date. Can somebody suggest me how to add host name to subject ? and the below code is correct for date ? my aim is to send mail with "subject in < hostname> on <date>".When i execute this script on my server its hung... (3 Replies)
Discussion started by: rocking77
3 Replies

5. Shell Programming and Scripting

Adding days to system date then compare to a date

Hi! I am trying to read a file and every line has a specific date as one of its fields. I want to take that date and compare it to the date today plus 6 days. while read line do date=substr($line, $datepos, 8) #date is expected to be YYYYMMDD if ; then ...proceed commands ... (1 Reply)
Discussion started by: kokoro
1 Replies

6. UNIX for Dummies Questions & Answers

Adding hours and minutes to current date (Only to date not to time)

Hi, I want to add some hours and minutes to the current date. For example, if the current date is "July 16, 2012 15:20", i want to add 5 hours 30 minutes to "July 16, 2012 00:00" not to "July 16, 2012 15:20". Please help. Thanks! (4 Replies)
Discussion started by: manojgarg
4 Replies

7. Shell Programming and Scripting

Mailx - Adding timestamp in CSV file

Hi allI am mailing csv file to our lotusnote server using shell script. I am using command to get require date/time :date +"%d%b%y-%X%p"File name is :TESTFILE-29Jan14-09:00:00AM.csv.When I am receving this on lotusnote server coming as "00AM.csv" rest of the string is getting truncated. I feel due... (1 Reply)
Discussion started by: krsnadasa
1 Replies

8. Shell Programming and Scripting

Adding Pager notification to mailx command.

Is it possible to add Pager Notification to mailx command?? :confused: Or by any other mean. ---------- Post updated at 08:49 AM ---------- Previous update was at 07:08 AM ---------- Hi just want to specify that by Pager i mean a message to the mobile number. Suppose i have following... (1 Reply)
Discussion started by: Sharma331
1 Replies

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

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
Locale::Codes::LangFam(3)				User Contributed Perl Documentation				 Locale::Codes::LangFam(3)

NAME
Locale::Codes::LangFam - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangFam; $lext = code2langfam('apa'); # $lext gets 'Apache languages' $code = langfam2code('Apache languages'); # $code gets 'apa' @codes = all_langfam_codes(); @names = all_langfam_names(); DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in ISO 639-5. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5 language family codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langfam('apa','alpha'); $lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages. This is the default code set. ROUTINES
code2langfam ( CODE [,CODESET] ) langfam2code ( NAME [,CODESET] ) langfam_code2code ( CODE ,CODESET ,CODESET2 ) all_langfam_codes ( [CODESET] ) all_langfam_names ( [CODESET] ) Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] ) Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME ) Locale::Codes::LangFam::delete_langfam_alias ( NAME ) Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangFam::delete_langfam_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.loc.gov/standards/iso639-5/id.php ISO 639-5 . AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-02-27 Locale::Codes::LangFam(3)
All times are GMT -4. The time now is 05:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy