Sendmail command truncating to list


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Sendmail command truncating to list
# 1  
Old 07-03-2018
Sendmail command truncating to list

Hey Folks - I'm trying to pass a list of To address using sendmail command but upon executing the script the to list gets truncated and not able to send the last
sender :

Code:
-bash-4.3$ ./akt.sh
Date : 03-JUL-18
aaaaa.sss#bgttecre.bom trcikant.shrivas#bgttecre.bom abc#xyz.bom pqr#lmn.bom lion
#tiger.bom tom#jerry.bom
lion... User unknown
#tiger.bom... User address required
/home/asian/dead.letter... Saved message in /home/asian/dead.letter

below is the code snippet :

Code:
(
echo "From: "
echo "Subject: testing of html table using awk"
echo "Content-type: text/html"
echo
awk -F "," 'BEGIN{print "<table>"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";print  "</tr>"} END{print "</table>"}' $fName
) | /usr/sbin/sendmail $toList_alert


$to_list = aaaaa.sss#bgttecre.bom trcikant.shrivas#bgttecre.bom abc#xyz.bom pqr#lmn.bom lion#tiger.bom tom#jerry.bom

picked from database mapping table


replaced @ with #, due to posting issues

Last edited by Don Cragun; 07-03-2018 at 05:15 AM.. Reason: Guess at where missing CODE tags should go...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to avoid truncating in ps output ?

Hello, This is Solaris 10 (x86) bash-3.2# cat /etc/release Solaris 10 5/09 s10x_u7wos_08 X86 Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms. Assembled 30 March... (5 Replies)
Discussion started by: solaris_1977
5 Replies

2. UNIX for Advanced & Expert Users

Regarding help in sendmail command

Hello All, I have a query here. I want to send an email by sendmailcommand in BASH. So email should have body(by reading a Input_file) in it as well as it should send same Input_file as attachment too. To do so I have tried as following. sendmail_touser() { cat - ${Input_file_HTML} << EOF |... (5 Replies)
Discussion started by: RavinderSingh13
5 Replies

3. Shell Programming and Scripting

Configure CC list in sendMail

Hi All, When I send a mail using sendMail command it sends a mail to the concerned with few people in cclist. Not sure where cc list is configured. I want to change that cc list configuration. Please help. Thanks and Regards Nagaraja Akkivalli. (5 Replies)
Discussion started by: Nagaraja Akkiva
5 Replies

4. Shell Programming and Scripting

nawk is truncating output

Legends, I have 2 files f1 and f2. when i use nawk to compare the difference(subtraction) from 4th column of the file, it truncates the output. can you please help to resolve this. subtraction is (4th col of f1 - 4th col of f2). but it gives only below lines out of 116. I want to print all... (7 Replies)
Discussion started by: sdosanjh
7 Replies

5. Shell Programming and Scripting

plink truncating commands

I'm using plink.exe on WinXP to run some commands on Z/OS BASH. My commands are interspersed with echo commands so that I can parse the output and work out what is where. The first hundred or so commands run fine, but then one of them gets truncated. For example: Input: echo :end_logdetail:... (6 Replies)
Discussion started by: PhilHibbs
6 Replies

6. Shell Programming and Scripting

Truncating a mail file

Hi, I have a Unix mail file that I need to truncate, based on the date of the messages. For those not familiar with the format, it is a single file for each user, with the first line of the mail message looking like the following: From user@sitename.com Thu Apr 21 05:40:33 2011 Each... (3 Replies)
Discussion started by: joed
3 Replies

7. UNIX for Advanced & Expert Users

Sendmail command

Can anyone tell me? How can i attach the file using sendmail command? Give me one example. (2 Replies)
Discussion started by: kingganesh04
2 Replies

8. UNIX for Dummies Questions & Answers

Truncating the last character

Hi all , I am creating the file which holds the create query to run in the sql prompt: so when i am creating: create table XXX( SD Varchar2(10), DF Varchar2(10),) I am getting one comma at the last ,before i am inserting the closing bracket i need to delete that? kindly provide me the... (1 Reply)
Discussion started by: ithirak17
1 Replies

9. Shell Programming and Scripting

Truncating a variable

I have a variable that is a full path name and I just want the file name with out the extension. I have figured out how to do this using some temp files but I would really like to avoid that if possible. I know I can do echo ${TMPNAME%.*} to drop the extension is there a similar way to drop... (3 Replies)
Discussion started by: whdr02
3 Replies

10. UNIX for Dummies Questions & Answers

`ps` command truncating text

I have some processes that show a long file path as part of the process name and the process name gets truncated off. Does anyone know how to get the full output from the `ps`command so that I can see the whole process name? (9 Replies)
Discussion started by: keelba
9 Replies
Login or Register to Ask a Question