Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why are the two results dfferent?

Status
Not open for further replies.

volcano

Programmer
Aug 29, 2000
136
HK
Hello guys and gals, I have prepared a command to execute in Solaris OS. There are 2 files which contain my command. The command in both files is the same, but I wonder very much why the first file executes successfully but the second one fails:

First file contains:
( uuencode file1 file1; uuencode file2 file2; ) | mailx -s "test1" abc@abc.com


Second file contains:
LIST="uuencode file1 file1l uuencode file2 file2;"
echo `( $LIST ) | mailx -s "test2" abc@abc.com`


Thank you
 
Sorry, there is a typing error. The updated one is as follows:


First file contains:
( uuencode file1 file1; uuencode file2 file2; ) | mailx -s "test1" abc@abc.com


Second file contains:
LIST="uuencode file1 file1; uuencode file2 file2;"
echo `( $LIST ) | mailx -s "test2" abc@abc.com`
 
How about this:

LIST=`(uuencode file1 file1; uuencode file2 file2;)`
echo $LIST | mailx -s "test2" abc@abc.com`

-jim
 
Thanks Jimbo!
I tried the code. It can send me a email. But the email contains lots of unknown text....maybe my attachments are not encoded correctly by UUENCODE?

Thank you!
 
My problem is finally solved. Thank bluelake for his/her help. His/her solution is as follows (which was posted in SUN Solaris forum) :

#!/usr/bin/sh
(uuencode file1 file1;uuencode file2 file2)>list
cat list |mailx -s "test2" huxu@cn.fujitsu.com

Besides, I would appreciate SamBones, J1mbo, pmcmicha, Annihilannic and julianbarnett very much for your great help too! I am so happy all of you could spend some time answering my questions~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top