Top Forums UNIX for Dummies Questions & Answers Sending mail to multiple recipient added in a text file Post 302936342 by jim mcnamara on Tuesday 24th of February 2015 09:32:08 PM
dest=$(cat email_names.txt | tr -s '\n' ' ' )
mailx -s "$xsub" $dest

Note the email addresses should NOT be comma-delimited. mailx is front end for sendmail.
Test Your Knowledge in Computers #1010
Difficulty: Easy
The number 200 in base 8 equals 128 in base 10.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need to attach a txt file while sending mail

Hi, I need to attach a txt file while sending mail thru Unix. Please help me out in this.. -Charan. (9 Replies)
Discussion started by: charan81
9 Replies

2. UNIX for Advanced & Expert Users

sending mails with attachment and also some text in mail body

Hi, Can some one help me with the syntax of the mailx that should send an attachment and also some text in the message body together. When I am using the following syntax it is not sending the attachment but only the message body. unix2dos -ascii $REPORTFILE | uuencode $PCFILE | mailx -s... (7 Replies)
Discussion started by: guptan
7 Replies

3. UNIX for Dummies Questions & Answers

Sending mail in the dead.letter file

Sorry for this one ladies and gents, it's probably very easy but I don't know how to, sound familiar :-) I'm using sendmail on a web server that sends some mail through forms, not many. I've got sendmail configured to use our networks relay host and everything was working well. The power... (4 Replies)
Discussion started by: mjdavies
4 Replies

4. Shell Programming and Scripting

Get the latest added part of a text file?

Hi, I want to get the latest added part of a text file sent over the network to for analysis. Is there a tool to use to keep track of which part of a text file that has already been analysed so only the "new" lines will be sent and handled? I have checked a few tools but I still donīt know how to... (3 Replies)
Discussion started by: pcrs
3 Replies

5. Shell Programming and Scripting

I want Trailer to be added into the text file.

Hi folks, I want Trailer to be added into the txt file the format is below. flatfile-> abc.txt count of the file is 500 records. I want the trailer in this format: TRAILER|500 (pipe delimeter). Please suggest the comands ASAP. Rgds Ann (5 Replies)
Discussion started by: Haque123
5 Replies

6. Shell Programming and Scripting

Not able to attach text in body of email while sending mail with attachment

Hi, We have been trying to send mail with attachment and it is going fine, but when we try to attach a text to the body of the email, we find that the mail is going fine with the body text but the attachment is not going through. We are using ksh. The command that is successfull without the... (6 Replies)
Discussion started by: jmathew99
6 Replies

7. Shell Programming and Scripting

mailx -s not sending the file to mail address

Hi All, OS:Red Hat Linux 4 86x64 Below is my shell script which is not sending mail to the mail recipient: #!/bin/bash export MAILLIST="" cd <path_to_the_script_perf_report.sql> sqlplus / as sysdba @perf_report.sql if then cat <path_to_the_script/*MONTHLY*REPORT*.lst... (6 Replies)
Discussion started by: a1_win
6 Replies

8. Shell Programming and Scripting

Echo - Sending mail to multiple addresses

Hi, If I want my script to send a mail to multiple recipients I can do the following: if then echo $err_string1 | mailx -s "UAT CPU ALERT" echo $err_string1 | mailx -s "UAT CPU ALERT" fi Can this also be done something like: ... (1 Reply)
Discussion started by: runnerpaul
1 Replies

9. Shell Programming and Scripting

sending multiple files along with mail message using uuencode

Hi, I have a requirement to send a mail with multiple files attached to it and along with the text message in the mail. I am trying sumthing like below but it only sends me the text message and no files attached to the mail. ---------------------------------------- ( uuencode file1... (1 Reply)
Discussion started by: sachinkl
1 Replies

10. Shell Programming and Scripting

Mail sending with multiple attachement(pdf and csv) with html content from Linux

Hi, We have a requirement to send multiple attachment(pdf and csv) along with html content in a single mail. For that we are using uuencode. It is working for single pdf attachment and html content. But we are unable to send both pdf and csv attachment with html content. Below is the script.... (5 Replies)
Discussion started by: dholea
5 Replies
STRCAT(3)						     Linux Programmer's Manual							 STRCAT(3)

strcat, strncat - concatenate two strings SYNOPSIS
#include <string.h> char *strcat(char *dest, const char *src); char *strncat(char *dest, const char *src, size_t n); DESCRIPTION
The strcat() function appends the src string to the dest string, overwriting the null byte ('') at the end of dest, and then adds a ter- minating null byte. The strings may not overlap, and the dest string must have enough space for the result. The strncat() function is similar, except that * it will use at most n characters from src; and * src does not need to be null-terminated if it contains n or more characters. As with strcat(), the resulting string in dest is always null-terminated. If src contains n or more characters, strncat() writes n+1 characters to dest (n from src plus the terminating null byte). Therefore, the size of dest must be at least strlen(dest)+n+1. A simple implementation of strncat() might be: char* strncat(char *dest, const char *src, size_t n) { size_t dest_len = strlen(dest); size_t i; for (i = 0 ; i < n && src[i] != '' ; i++) dest[dest_len + i] = src[i]; dest[dest_len + i] = ''; return dest; } RETURN VALUE
The strcat() and strncat() functions return a pointer to the resulting string dest. CONFORMING TO
SVr4, 4.3BSD, C89, C99. SEE ALSO
bcopy(3), memccpy(3), memcpy(3), strcpy(3), strncpy(3), wcscat(3), wcsncat(3) COLOPHON
This page is part of release 3.25 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at GNU
2008-06-13 STRCAT(3)

Featured Tech Videos

All times are GMT -4. The time now is 03:45 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy