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 :stuck_out_tongue:

Thanks to read you.

Mathieu

Try...

(  echo "message" 
   uuencode /path/to/file1 file1
   uuencode /path/to/file2 file2
   : etc
) | mailx -s "subject" abc@xyz.com

Thanks a lot Igor

I toke your idea to write my solution :smiley:
You could find it bellow :

    SUBJECT=$1
    BODY=$2
    RECIPIENT=$3
    FILE=$4 \#Files to attach \(like /tmp/myfiles_*.txt\)

    \(cat $BODY
    for i in \`ls -1 $FILE\`
    do
            file_name=\`basename $i\`
            uuencode $i $file_name
    done
    \) | mailx -s "$SUBJECT" $RECIPIENT

Regards
Mathieu