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:
#!/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:
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:
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