|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Combine two pipe commands?
How can I combine both of the commands?
cat filename | uuencode filename | mail -s "test" me@me.com cat body$ | mail -s "test" me@me.com Basically I want an attachment AND a message in the body of an email, but I don't know how to pipe two things to mail. Thanks! |
|
#2
|
|||
|
|||
|
Answered my own question...
I found the answer over in Shell Programming and Scripting so I'll post it in case anyone else is curious.
/usr/bin/echo "Email text\nNew line\nAnother new line" >x | uuencode sourcefile.txt sourcefile.txt | cat x - | mailx -s "Email subject" -r "reply@to.com" Credit given to haryadoon: http://www.unix.com/showthread.php?t=18370 |
|
#3
|
|||
|
|||
|
to send message in the body and to attach a file,
here it is... Code:
( echo "text in the body of the mail "; uuencode t t.txt ) | mailx -s "sub" "abc@xyz.com" |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Combine two pipe commands? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|