Sponsored Content
Top Forums UNIX for Advanced & Expert Users Problem with multiple excel attachments using mailx Post 302072480 by indo1144 on Wednesday 3rd of May 2006 11:14:22 AM
Old 05-03-2006
Quote:
Originally Posted by ramanam2004
I have written the following code send multiple attachments using mailx

(uuencode file1 file1; uuencode file2 file2; uuencode file3 file3Smilie | mailx -s MultipleAttachments -r Sysadmin abc@xyz.com
I believe the problem has to do with piping, but not entirely sure.

Here's something you could try, this is from one of my live scripts.:
Quote:
(
for graph in output/*_files.gif
do
uuencode $graph $(basename $graph)
done

cat <<EOF
Put your preformatted text here.

EOF
)| mail -s "Performance Graphs for `date +%Y-%m-%d`" user@boo.bar
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh : using mailx and attachments

Hi I want to use mailx command to send a message included more than one file. I tried to use uuencode in pipe but it could only generate one file. I would avoid using an archive file :p Thanks to read you. Mathieu (2 Replies)
Discussion started by: madmat
2 Replies

2. AIX

Aix Unix Mailx Attachments

I'm trying to send a mailx with an attachment, really I have not do it in a long time. I forgot (3 Replies)
Discussion started by: darioa
3 Replies

3. Shell Programming and Scripting

Problem sending excel attachments with MIME::Lite in perl

I am running a perl script that generates an excel doc and then emails it as an attachment. I can generate the excel file fine. I can scp it from the box and open it with no problems. When I send it over email, the file does open properly. The file in email is only 288 B, but on the server it is... (1 Reply)
Discussion started by: Mike_the_Man
1 Replies

4. UNIX for Dummies Questions & Answers

Using mailx to save attachments

Hi, I have a requirement to save a mail attachment sent from Windows to a Solaris 9 server. I'm using mailx on the server and have seen a few examples of how to attach a file for sending but none for how to save the attachment when receiving. I can see the encoded text when I look at... (2 Replies)
Discussion started by: Jublio
2 Replies

5. Shell Programming and Scripting

Not able to send multiple attachments using uuencode and mailx

Hi, I am seeing some junk characters when I attach the second file, given below is the logic I used. Please help me resolving the issue. ( uuencode file1.txt file1.txt.lst && uuencode file2.txt file2.txt.lst ) > attachment.txt cat body.txt attachment.txt > combinemail.txt mailx -m... (7 Replies)
Discussion started by: prasperl
7 Replies

6. Shell Programming and Scripting

mailx problem with multiple cc

I am writing a script to send an email of the result of the process but i cannot make the cc work correctly. RECIP="abc@example.com def@example.com" CC="ghi@example.com jkl@eaxmple.com" mailx -s "testing" -c $CC $RECIP < inputfile.txt Result: To: abc@example.com; def@example.com;... (4 Replies)
Discussion started by: The One
4 Replies

7. Shell Programming and Scripting

problem with attaching multiple attachments dynamically.

Guys, I've been trying to attach & email all txt files from my directory using the shell script below: #!/usr/bin/sh ################################################################################ send_ml_rej_notn() { FILE_NAME=${1} ATTACH_FILE_NAME=`basename ${FILE_NAME}` if ; then ... (0 Replies)
Discussion started by: bhagat.singh-j
0 Replies

8. Shell Programming and Scripting

Problem with multiple mail attachments

Hi everyone... I am facing problem with the multiple mail attachments. cd /work/mohan/pi_log/ mail_file='uuencode ahmedabad.csv ahmedabad.csv ; uuencode ahmedabad_devrpt_20110530.csv ahmedabad_devrpt_20110530.csv' ( $mail_file ) | mailx -m -s"test" domain@website.com its giving me error... (1 Reply)
Discussion started by: mohanm
1 Replies

9. Shell Programming and Scripting

Sending Multiple Attachments using MAILX

I have created a shell scripts and wanted to email users multiple attachments using mailx. I noticed that when I do a man on mailx I see and -a option for attachments. When I run a: mailx -s "test attachments" -a include_file -a exclude_file testuser@mydomain.com (Interrupt -- one more to... (1 Reply)
Discussion started by: metallica1973
1 Replies

10. Shell Programming and Scripting

Mailx sending attachments to personal email, but not SharePoint?

Hello! I am writing a KornShell script that (in addition to other things) sends a file from a Unix directory to a SharePoint directory. However when executing the script there is no sign of the file on the SharePoint. I have tested the script using my personal email as the destination and the... (3 Replies)
Discussion started by: mattkoz
3 Replies
comm(1) 							   User Commands							   comm(1)

NAME
comm - select or reject lines common to two files SYNOPSIS
comm [-123] file1 file2 DESCRIPTION
The comm utility reads file1 and file2, which must be ordered in the current collating sequence, and produces three text columns as output: lines only in file1; lines only in file2; and lines in both files. If the input files were ordered according to the collating sequence of the current locale, the lines written will be in the collating sequence of the original lines. If not, the results are unspecified. OPTIONS
The following options are supported: -1 Suppresses the output column of lines unique to file1. -2 Suppresses the output column of lines unique to file2. -3 Suppresses the output column of lines duplicated in file1 and file2. OPERANDS
The following operands are supported: file1 A path name of the first file to be compared. If file1 is -, the standard input is used. file2 A path name of the second file to be compared. If file2 is -, the standard input is used. USAGE
See largefile(5) for the description of the behavior of comm when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes). EXAMPLES
Example 1 Printing a list of utilities specified by files If file1, file2, and file3 each contain a sorted list of utilities, the command example% comm -23 file1 file2 | comm -23 - file3 prints a list of utilities in file1 not specified by either of the other files. The entry: example% comm -12 file1 file2 | comm -12 - file3 prints a list of utilities specified by all three files. And the entry: example% comm -12 file2 file3 | comm -23 -file1 prints a list of utilities specified by both file2 and file3, but not specified in file1. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of comm: LANG, LC_ALL, LC_COLLATE, LC_CTYPE, LC_MESSAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 All input files were successfully output as specified. >0 An error occurred. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWesu | +-----------------------------+-----------------------------+ |CSI |enabled | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
cmp(1), diff(1), sort(1), uniq(1), attributes(5), environ(5), largefile(5), standards(5) SunOS 5.11 3 Mar 2004 comm(1)
All times are GMT -4. The time now is 02:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy