mailx command (Sun Solaris 8)


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting mailx command (Sun Solaris 8)
# 1  
Old 07-15-2004
mailx command (Sun Solaris 8)

Hi,

I would like to use mailx to send multiple files to one recipient whereas each file should be send as a separate email.

mailx -s "Subject" email@user.de < file1 file2 file3 file4

If I use this command email@user.de will receive only file4.
And: cat file* | mailx -s .... will combine everything to one email!

Could you please give me a hint how to manage this?

Thanks in advance!!
# 2  
Old 07-15-2004
You should simply use a loop - either a for , while, or until loop should work fine. You would possibly need a counter which you can set up easily (set counter = 1 or 0 , increment it on each pass through the loop, stop the loop when the counter is equal or greater than the number of files)
# 3  
Old 07-16-2004
Syntax is...

for File in file*
do
mailx -s "Subject" email@user.de < $File
done
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Solaris

Mailx help in Solaris

Hi Team, We are with Solaris 10. And presently we are sending mail using the tool mailx -s. Our requirement is we need to send amil with HIGHPRIORITY. SO is there any way to send the mail as HIGHPRIORITY. If not any alternative way instaead of using mailx. Thanks in advance. Regards Bala (7 Replies)
Discussion started by: balagj709
7 Replies

2. Solaris

Sun Solaris not able to ping Sun Solaris

I have a Sun Blade 2500 with SUN 5.9 OS installed. I can ping other machines(windowsXP/2003) from my SUN machines but not able to ping each other SUN machines which i have newly installed. (7 Replies)
Discussion started by: z_haseeb
7 Replies

3. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

4. Solaris

useful links and help resources for Sun's products and Sun's Solaris

Hi all, Those links might help anyone Knowledge base Video tutorials (0 Replies)
Discussion started by: h@foorsa.biz
0 Replies

5. Solaris

Sun Fire 280R Sun Solaris CRT/Monitor requirements

I am new to Sun. I brought Sun Fire 280R to practice UNIX. What are the requirements for the monitor/CRT? Will it burn out old non-Sun CRTs? Does it need LCD monitor? Thanks. (3 Replies)
Discussion started by: bramptonmt
3 Replies

6. UNIX for Dummies Questions & Answers

Sun Solaris 10: How do I create a bootup disc? The Sun website confuses me

Hey there, I am starting a Computer Science Foundation year at the end of this month and am trying to get a little bit ahead of the game. I have always wanted to learn Unix and am currently struggling with creating a boot disc to run Solaris (I have chosen to study this) from as opposed to... (0 Replies)
Discussion started by: Jupiter
0 Replies

7. UNIX for Dummies Questions & Answers

Need Help w/mailx - Sun Solaris

I have this Legato application which generates a file and then it pipes it to mailx. cat << savelog.txt | mailx -s "Saverpt `date +"%c`" myemail@xxx.com The "savelog.txt does get created and is owned by root and other group, but yet will not email using mailx to myemail@xxx.com. Mailx... (4 Replies)
Discussion started by: gzs553
4 Replies

8. UNIX for Advanced & Expert Users

find command loops in a sun Solaris 8 cluster

It has happended twice the past 3 months. The find command which is the standard part of unix accounting script "dodisk", which searches directories to find out how much disk space a user has used. On a particular cluster of 6 servers, several file systems, the find command has twice used all... (2 Replies)
Discussion started by: scottman
2 Replies

9. Solaris

Sun Solaris Sun Java Desktop

Ok I a n00b, not gunna hide it so here goes - Sun Solaris, V.10 i386 - during the setup, I can choose a screen resolution that looks great with 65k colors and all. However, when all is said and done 4 disks and a reboot later, I get hanious 640x480 @ 256 only. If I choose the Sun Java Desktop... (20 Replies)
Discussion started by: Spooky
20 Replies
Login or Register to Ask a Question