Sponsored Content
Top Forums Shell Programming and Scripting awk Script Output in Outlook Formatting Issue Post 302890384 by Ariean on Wednesday 26th of February 2014 01:22:25 PM
Old 02-26-2014
awk Script Output in Outlook Formatting Issue

When i execute the below shell script with 2 different Input files, for one of the data files (datafile1) my email message body in the outlook messes up and every thing comes up in one line. May i please know what i am doing wrong here or how to fix this? The only difference in data files is one is having an extra "s" (Farm Credit Services & Farm Credit Service). I didn't understand why that is messing up.

Shell Script:
Code:
#!/bin/bash
awk -F\| -v loc="$2" -v file="$1" '
        BEGIN {
                print "Informatica Was Able To Successfully Load the XML Data File:" loc"/"file
        }
        {
                print "             "
                print " Provider: "$1
                print " Provider Desc: "$2
                print " UNINUM: "$3
                print " UNINUM Desc: "$4
                print " Extract Date: "$5
                print " Version Number: "$6
                print " Loading Status: "$7
                print " Validation Status: "$8
        }
' OFS="|" "dwh_StageLoadEmail.lst" | /usr/bin/mutt -s "INFO:XML Data File Loaded Successfully" "xyz@zyx.com"


Data File1 (dwh_StageLoadEmail.lst):
5|xxxBank|022222|Farm Credit Services, ACA |31-DEC-13|1|COMPLETED|COMPLETED

Output In Outlook:
Code:
Informatica Was Able To Successfully Load the XML Data File:/var/tmp/InfaLogs/dwh_FeedValidationLogStageTbl.lst
           
 Provider: 5
 Provider Desc: xxxxBank
 UNINUM: 022222
 UNINUM Desc: Farm Credit Services, ACA  Extract Date: 31-DEC-13  Version Number: 1  Loading Status: COMPLETED  Validation Status: COMPLETED

Data File2 (dwh_StageLoadEmail.lst):
5|xxxBank|022222|Farm Credit Service, ACA |31-DEC-13|1|COMPLETED|COMPLETED

Output In Outlook:
Code:
Informatica Was Able To Successfully Load the XML Data File:/var/tmp/InfaLogs/dwh_FeedValidationLogStageTbl.lst
   
 Provider: 5
 Provider Desc: xxxxBank
 UNINUM: 022222
 UNINUM Desc: Farm Credit Service, ACA 
 Extract Date: 31-DEC-13
 Version Number: 1
 Loading Status: COMPLETED
 Validation Status: COMPLETED

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Formatting Script Output

Hello all, Can somebody please offer some advice. I'm working on a small script to list all packages on the local and remote systems and need it in the following format. Machine Name, Package, Version Here is what i have so far but i can't seem to get the output of the hostname to loop to... (3 Replies)
Discussion started by: liketheshell
3 Replies

2. Shell Programming and Scripting

Question about formatting output using AWK

Hi everyone. I've got this fille... 0 5000001 5000002 5000003 5000006 5000007 5000219 11000156 11003130 11003132and this script... #!/bin/ksh FILE_ALERT_CONTACT_LIST=users.txt userID=`awk -F"=" '{printf $1 ", "}' $FILE_ALERT_CONTACT_LIST` (9 Replies)
Discussion started by: Fatbob
9 Replies

3. Shell Programming and Scripting

Formatting the output of a script

Dear readers, I have a script that counts the number of files in particular directories in my home location and displays the output. Now I have 13 directories in my home location. I am getting the output as : Avishek_dir 13 Kunal_dir 17 Shantanu_dir 18 Arup_dir 12 Pranabesh_dir 19 . .... (7 Replies)
Discussion started by: avishek007
7 Replies

4. Shell Programming and Scripting

output formatting with awk.

# echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin How would i write a script to display permission on each folders in $PATH variable below format. drwxr-xr-x 2 0 root 4096 Nov 24 14:51 /usr/kerberos/sbin drwxr-xr-x 2 0... (2 Replies)
Discussion started by: pinga123
2 Replies

5. Windows & DOS: Issues & Discussions

Code tag like formatting in Outlook?

Hi, Not a shell scripting question ,but searched a lot over google ..but no success. How do put codes in outlook 2007 mail messages in good manner like the code tags option while posting in this forum :). Apologies if the question is very irrelevant or the solution is very simple. Regds,... (1 Reply)
Discussion started by: kunwar
1 Replies

6. Shell Programming and Scripting

Formatting of output from awk

Hi; i m running an command like; getfacl $(find /home/fstl/testShell/ -type f -ls | awk '{print $11}') and i m getting outpiut for all files in "testShell" folder as; # file: home/fstl/testShell/.script1.sh.swp # owner: root # group: root user:fstl:rw- user:ajay:rw- group:root:r--... (1 Reply)
Discussion started by: ajaypadvi
1 Replies

7. Shell Programming and Scripting

Formatting output of script

I'm looking for a way to neaten up the out put of an ldapquery. I might get one, none, or several returns for each query; and each query consists of multiple lines. And while each return will contain the same types of info, it might be in a different order, like: uniq: 1 ip: 192.168.2.3... (3 Replies)
Discussion started by: jnojr
3 Replies

8. Shell Programming and Scripting

Formatting grep and awk output

Hi there. I have a very large file and I am trying to format it so that I can pull out certain pieces of data/info and report it in spreadsheet format/style. The file has ###### which will separate each line that will be listed in the spreadsheet. Whenever I find "No" at the end of a line I want... (7 Replies)
Discussion started by: kieranfoley
7 Replies

9. Shell Programming and Scripting

Formatting output using awk in ksh

:oi was trying to write a script to format output of a command in ksh which has output as below: so i used : to get which i require at all times. But problem occurs when status part changes. above output i get when status is SU (success).If the status is IN (inactive), output of... (1 Reply)
Discussion started by: pr5439
1 Replies

10. Shell Programming and Scripting

Problem in formatting output in sed / awk

I have a file like this : ! 1 ! 542255 ! 50,140.00 ! ! 2 ! 551717 ! 5,805.00 ! ! 3 ! 551763 ! 8,130.00 ! ! 4 ! 551779 ! 750.00 ! ! 5 ! 551810 ! 56,580.00 ! ! 6 ! 551816 ! 1,350.00 ! ! 7 ! 551876 ! 360.00 ! ! 8 ! 551898 ! ... (10 Replies)
Discussion started by: adam1969in
10 Replies
Mail::GnuPG(3pm)					User Contributed Perl Documentation					  Mail::GnuPG(3pm)

NAME
Mail::GnuPG - Process email with GPG. SYNOPSIS
use Mail::GnuPG; my $mg = new Mail::GnuPG( key => 'ABCDEFGH' ); $ret = $mg->mime_sign( $MIMEObj, 'you@my.dom' ); DESCRIPTION
Use GnuPG::Interface to process or create PGP signed or encrypted email. new Create a new Mail::GnuPG instance. Arguments: Paramhash... key => gpg key id keydir => gpg configuration/key directory passphrase => primary key password use_agent => use gpg-agent if non-zero always_trust => always trust a public key # FIXME: we need more things here, maybe primary key id. decrypt Decrypt an encrypted message Input: MIME::Entity containing email message to decrypt. The message can either be in RFC compliant-ish multipart/encrypted format, or just a single part ascii armored message. Output: On Failure: Exit code of gpg. (0 on success) On Success: (just encrypted) (0, undef, undef) On success: (signed and encrypted) ( 0, keyid, # ABCDDCBA emailaddress # Foo Bar <foo@bar.com> ) where the keyid is the key that signed it, and emailaddress is full name and email address of the primary uid $self->{last_message} => any errors from gpg $self->{plaintext} => plaintext output from gpg $self->{decrypted} => parsed output as MIME::Entity get_decrypt_key determines the decryption key (and corresponding mail) of a message Input: MIME::Entity containing email message to analyze. The message can either be in RFC compliant-ish multipart/signed format, or just a single part ascii armored message. Output: $key -- decryption key $mail -- corresponding mail address verify verify a signed message Input: MIME::Entity containing email message to verify. The message can either be in RFC compliant-ish multipart/signed format, or just a single part ascii armored message. Note that MIME-encoded data should be supplied unmodified inside the MIME::Entity input message, otherwise the signature will be broken. Since MIME-tools version 5.419, this can be achieved with the C<decode_bodies> method of MIME::Parser. See the MIME::Parser documentation for more information. Output: On error: Exit code of gpg. (0 on success) On success ( 0, keyid, # ABCDDCBA emailaddress # Foo Bar <foo@bar.com> ) where the keyid is the key that signed it, and emailaddress is full name and email address of the primary uid $self->{last_message} => any errors from gpg has_public_key Does the keyring have a public key for the specified email address? FIXME: document better. talk about caching. maybe put a better interface in. mime_sign sign an email message Input: MIME::Entity containing email message to sign Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be signed. (i.e. it _will_ be modified.) clear_sign clearsign the body of an email message Input: MIME::Entity containing email message to sign. This entity MUST have a body. Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be signed. (i.e. it _will_ be modified.) ascii_encrypt encrypt an email message body using ascii armor Input: MIME::Entity containing email message to encrypt. This entity MUST have a body. list of recipients Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) ascii_signencrypt encrypt and sign an email message body using ascii armor Input: MIME::Entity containing email message to encrypt. This entity MUST have a body. list of recipients Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) mime_encrypt encrypt an email message Input: MIME::Entity containing email message to encrypt list of email addresses to sign to Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) mime_signencrypt sign and encrypt an email message Input: MIME::Entity containing email message to sign encrypt list of email addresses to sign to Output: Exit code of gpg. (0 on success) $self->{last_message} => any errors from gpg The provided $entity will be encrypted. (i.e. it _will_ be modified.) is_signed best guess as to whether a message is signed or not (by looking at the mime type and message content) Input: MIME::Entity containing email message to test Output: True or False value is_encrypted best guess as to whether a message is signed or not (by looking at the mime type and message content) Input: MIME::Entity containing email message to test Output: True or False value LICENSE
Copyright 2003 Best Practical Solutions, LLC This program is free software; you can redistribute it and/or modify it under the terms of either: a) the GNU General Public License as published by the Free Software Foundation; version 2 http://www.opensource.org/licenses/gpl-license.php b) the "Artistic License" http://www.opensource.org/licenses/artistic-license.php This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. AUTHOR
Robert Spier David Bremner <ddb@cpan.org> BUGS
/ISSUES/PATCHES Please send all bugs/issues/patches to bug-Mail-GnuPG@rt.cpan.org SEE ALSO
perl. GnuPG::Interface, MIME::Entity perl v5.14.2 2011-12-12 Mail::GnuPG(3pm)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy