Sponsored Content
Full Discussion: Email Format Output issues
Top Forums Shell Programming and Scripting Email Format Output issues Post 302961971 by Junes on Monday 7th of December 2015 04:40:36 AM
Old 12-07-2015
Email Format Output issues

Hi Guys,
I have written a script, which output information from email notfication. The output works fine in HTML format, but non-html format it is not shown in a human readable format.

Can you help with the format ***

Code:
Script        
echo " Server Name            :  $CLIENT_CHECK   " >> $OUTF
***     echo " Server Name            :"| awk '{printf  %-45s\n, $CLIENT_CHECK   " >> $OUTF
        echo " Policy Name            :  $POLICY_CHECK   " >> $OUTF
        echo " Schedule               :  $SCHEDULE_CHECK " >> $OUTF

Code:
Output
        Server Name                   :  sv203861   
***     Server Name                   : | awk '{printf  %-45s\n  ,sv203861 '} 
        Policy Name                   :  PROJECT_FOCUS   
        Schedule                      :  FULL

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues in the Format in excel file generated from unix machine

Hi, I have generated a report that contains many columns and since I need ir in excel format.. I just renamed te file to excel as follows: cp vijay.txt vijay.xls I have just attached this spreadsheet in the mail and I am getting it to my mail id. But, in the output excel, the columns that... (10 Replies)
Discussion started by: Vijay06
10 Replies

2. AIX

Issues on email delivery

Hello, there is a problem when using sendmail to certain destinations, basically the recipient will reject the incoming message because the user@local.domain.com is used as the sender (Return-Path), they would verify local.domain.com is not a valid DNS record which is true because it is a local... (11 Replies)
Discussion started by: neil_is_ere
11 Replies

3. Shell Programming and Scripting

Format the output to sent in Email

Hi I have a script #!/bin/sh # email addresses to send results to, separated by a space EMAILS="xxxx.yyyy@yahoo.com" SUBJECT="MySQL reporting " DISK_DATA_USAGE=/home/aaaa/usaage.txt mysql YYYYYYYY -e " select 100*sum(max_data_length) as disk_usage_pct from xxxxxx;" >... (2 Replies)
Discussion started by: asha210
2 Replies

4. Shell Programming and Scripting

Using AWK to format output and email

Hello, I'm a bit stumped, for some reason when using AWK 'print' is not printing the entire date/line. awk '{print "Ticket #: " $1} {print "Queue : " $2} {print "Recieved : " $3} {print "AP Date : " $4} {print "Circuit ID : " $5} {print... (4 Replies)
Discussion started by: ArvinSodhi
4 Replies

5. Ubuntu

Monitor issues Invalid Format

Hello Folks, Monitor took a crap on me so I bought a new flat screen. Im running Ubuntu 12 recieving an invalid format after the GUI login screen. How do I go about trying to change the resolution. FYI old monitor blew smoke so reconnecting it is not an option. From I understand their is no... (3 Replies)
Discussion started by: Fingerz
3 Replies

6. Shell Programming and Scripting

Date format issues

I would like to get the below in YYYY MMDD format, Last date of the week Last date of the month Last date of the year And then compare d_date with the above if it matches it has to send some email. while read email_address; do mail -s "$subject"... (1 Reply)
Discussion started by: Aditya_001
1 Replies

7. Shell Programming and Scripting

Script to generate Excel file or to SQL output data to Excel format/tabular format

Hi , i am generating some data by firing sql query with connecting to the database by my solaris box. The below one should be the header line of my excel ,here its coming in separate row. TO_CHAR(C. CURR_EMP_NO ---------- --------------- LST_NM... (6 Replies)
Discussion started by: dani1234
6 Replies

8. Shell Programming and Scripting

Mail Format Issues

Hi All, I 'm trying to find a way to send my contents of a file as a body of email in the format shown below. However, the format of the contents are messed up when I receive the email. ---------------------------------------------------------------------------------------------------------... (2 Replies)
Discussion started by: shash
2 Replies

9. Shell Programming and Scripting

Getting email output in single line with out space in email

I have tried below email method and i am getting every thing in single line . i have put echo to provide space, but it is not helping my code ( echo "From: $FROM" echo "To: $MAILTO" echo "CC: $CC" echo "Subject: $SUBJECT" echo "MIME-Version: 1.0" echo 'Content-Type: multipart/mixed;... (6 Replies)
Discussion started by: mirwasim
6 Replies

10. Shell Programming and Scripting

UNIX command output format in email is not same as on the system

Hi I have script to collect file system usage statistics from few remote unix hosts and email . On the UNIX system the column spacing is fine but the email output is not aligned properly. Any tips to fix this ? (1 Reply)
Discussion started by: new2prog
1 Replies
DATEFMT_GET_LOCALE(3)							 1						     DATEFMT_GET_LOCALE(3)

IntlDateFormatter::getLocale - Get the locale used by formatter

	Object oriented style

SYNOPSIS
public string IntlDateFormatter::getLocale ([int $which]) DESCRIPTION
Procedural style string datefmt_get_locale (IntlDateFormatter $fmt, [int $which]) Get locale used by the formatter. PARAMETERS
o $fmt - The formatter resource o $hich - You can choose between valid and actual locale ( Locale::VALID_LOCALE, Locale::ACTUAL_LOCALE, respectively). The default is the actual locale. RETURN VALUES
the locale of this formatter or 'false' if error EXAMPLES
Example #1 datefmt_get_locale(3) example <?php $fmt = datefmt_create( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'locale of the formatter is : " . datefmt_get_locale($fmt); echo 'First Formatted output is " . datefmt_format($fmt, 0); $fmt = datefmt_create( 'de-DE', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'locale of the formatter is : ' . datefmt_get_locale($fmt); echo 'Second Formatted output is ' . datefmt_format($fmt, 0); ?> Example #2 OO example <?php $fmt = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'locale of the formatter is : ' . $fmt->getLocale(); echo 'First Formatted output is ' . $fmt->format(0); $fmt = new IntlDateFormatter( 'de-DE', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'locale of the formatter is : ' . $fmt->getLocale(); echo 'Second Formatted output is ' . $fmt->format(0); ?> The above example will output: locale of the formatter is : en First Formatted output is Wednesday, December 31, 1969 4:00:00 PM PT locale of the formatter is : de Second Formatted output is Mittwoch, 31. Dezember 1969 16:00 Uhr GMT-08:00 SEE ALSO
datefmt_create(3). PHP Documentation Group DATEFMT_GET_LOCALE(3)
All times are GMT -4. The time now is 07:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy