Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to escape the tabspaces while sending email? Post 302836075 by Ariean on Tuesday 23rd of July 2013 12:59:29 PM
Old 07-23-2013
How to escape the tabspaces while sending email?

Hello All,

I have below excerpt from a shell script(bash) and the output from it as shown below. How do i make the email come out with message body left justified. As of now because of those tabs the message is coming out with those tab spaces. May i please know how can i supress them?

Code:
                if [ $( echo "${TOT_PRINCIPAL_BALANCE_DOLLARS} == ${COMP_PRINCIPAL_BALANCE_DOLLARS}" | bc -l ) -eq 1 ]
                then
                        logit "Principal Balance Dollars For Uninum($UNINUM): ${TOT_PRINCIPAL_BALANCE_DOLLARS} Matches With ${COMP_PRINCIPAL_BALANCE_DOLLARS}"
                else
                        logit "Principal Balance Dollars For Uninum($UNINUM): ${TOT_PRINCIPAL_BALANCE_DOLLARS} Doesn't Match With ${COMP_PRINCIPAL_BALANCE_DOLLARS}"
                        ((i+=1))
                        #ARR[$i]="Principal Balance Dollars For Uninum($UNINUM): '${TOT_PRINCIPAL_BALANCE_DOLLARS}' Doesn't Match With '${COMP_PRINCIPAL_BALANCE_DOLLARS}'"
                        ARR[$i]="
                                Uninum: $UNINUM
                                Provider: $PROVIDER
                                Principal Balance Dollars: '${TOT_PRINCIPAL_BALANCE_DOLLARS}' Doesn't Match With '${COMP_PRINCIPAL_BALANCE_DOLLARS}'
                                "
                fi


  if [ ${#ARR[*]} -gt 0 ]
        then
                logit "Array is not empty, Email Will Be Sent Out As The Hash Total Comparisions Is NOT Successful"
                #printf "%s\r\n" "${ARR[@]}" | /usr/bin/mutt -s "ALERT: Stage Hash Total Comparision Inconsistencies" "${EMAIL_LIST}" -i "${6}"
                printf "%s\r\n" "${ARR[@]}" | /usr/bin/mutt -s "$HOST - $DBSRC - ALERT: Stage Hash Total Comparision Inconsistencies" "${EMAIL_LIST}"
        else
                logit "Array is empty, Email Will Not Be Sent Out As The Hash Total Comparisions Is Successful"
        fi

Email Body Output:

Code:
				Uninum: 710056
				Provider: 16
				Principal Balance Dollars: '183498286.85' Doesn't Match With '183498285'


Last edited by Ariean; 07-23-2013 at 02:25 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sending email

I have an Solaris 8 machine running a managment application. One of the features of this application is to configure alarm forwarding to an email undress. When i configured the application to do that, it asked me only about the recipient email address. Quesiton: how to configure my Solaris 8... (7 Replies)
Discussion started by: bcheaib
7 Replies

2. Shell Programming and Scripting

sending email in unix. need help!

how can I send an email in UNIX, attach a file and cc a receipient? i use the command below to attach a file (this works): uuencode path/filename filename | mailx -s "subject" addr@host.com here is how i cc a receipient (this also works): i have a file named cc.lis and contains: Hello... (2 Replies)
Discussion started by: tads98
2 Replies

3. UNIX for Dummies Questions & Answers

sending email

hi, is there any possiblity to send email from the command prompt, for eg i want to send alert to any mail id like /data/logs is 80% to my hotmail account , xxx@hotmail.com is this really possible,, if not, then what are the prerequistes need to do this (1 Reply)
Discussion started by: vasikaran
1 Replies

4. Shell Programming and Scripting

I have some problem in sending an email, please help me.

Hi, I am writing a kornshell script, once the successful completion of the script I need to send an email with body of a text along with an attachment. But i couldnt able to send an email with both body of the text and attachment at the same time in unix. The following is the code i tried, ... (2 Replies)
Discussion started by: Sheethal
2 Replies

5. UNIX for Dummies Questions & Answers

help sending the date in an email

Hi all, I'm new to the forums. Let me start off by saying UNIX is great to use and I enjoy using it. That being said I am just learning how to use it in college and I need help with an assignment. The assignment is I have to use crontab to find out when my teacher logs in on the upcoming weekend... (2 Replies)
Discussion started by: roflmywaffle
2 Replies

6. Shell Programming and Scripting

Sending Email with Attachment

Hi, I want to send an email with multiple attachment using uuencode and mail command. I am able to send with one attachment Ex:uuencode abc.txt abc.txt | mail test@test.com -s "Test3" Can anyone reply with syntax. Regards BS (3 Replies)
Discussion started by: balajiora
3 Replies

7. Linux

sending an email

I have used an already-built ActiveX control to send email from my asp web pages. One of the parameters I fill is FromName which defines the tittle the recipient will see in the From entrance in his Inbox. Now Iīm trying to use mail to send an email from a Shell but I havenīt found the... (1 Reply)
Discussion started by: RandomAccess
1 Replies

8. Shell Programming and Scripting

sending an email with attachment

Hi, Please help me in sending an e-mail with attachment through unix mailx command is not present in our unix box. (4 Replies)
Discussion started by: dudd9
4 Replies

9. Shell Programming and Scripting

Using top command to email if process is exceeding 25% and sending an email alert if so

This is my first time writing a script and Im having some trouble, Im trying to use the top command to monitor processes and the amount of CPU usage they require, my aim is to get an email if a process takes over a certain percentage of CPU usage I tried grep Obviosly that hasnt worked, Any... (8 Replies)
Discussion started by: jay02
8 Replies

10. Linux

Sending an email using mutt...

I wanted to send "config.log" to the usergroup that handles open source support for Octave 3.8.0, a programming language as there were build errors. In order to send an email from unix command line, I am trying to use mutt, and I need a straightforward way of sending emails, as the commands... (1 Reply)
Discussion started by: jon80
1 Replies
WWW::Topica::Reply(3pm) 				User Contributed Perl Documentation				   WWW::Topica::Reply(3pm)

NAME
WWW::Topica::Index - parse a single Topic mailing list index SYNOPSIS
my $index = WWW::Topic::Index->new($index_html); foreach my $message_id ($index->message_ids) { # the mail has some information and also provides a link to the reply ... my $mail = WWW::Topica::Mail->new($topica->fetch_mail($mess_id), $mess_id); # which has other information (like the un-htmled mail and the email address) ... my $reply = WWW::Topica::Reply->new($topica->fetch_reply($mail->id, $mail->eto), $mail->id, $mail->eto); } print "Next offset is ".$index->next." "; print "Previous offset is ".$index->prev." "; DESCRIPTION
Used to parse a single reply page from Topica.com's mailing list indexes. Reply pages have the body of the email (albeit quoted) and potentially a full email address. METHODS
new <page html> <message id> <eto> Takes the html of the page, the eto and the message-id and parses the html. parse <html> Parse the html to get the subject, email address and body of the email. id Get the message id eto Get the message eto email Get the email address parsed out. subject Get the email subject parsed out. body Get the email body parsed out. AUTHOR
Simon Wistow <simon@thegestalt.org> COPYRIGHT
Copyright (c) 2004, Simon Wistow perl v5.10.1 2006-01-03 WWW::Topica::Reply(3pm)
All times are GMT -4. The time now is 08:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy