-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hello
je ne sais pas si tu as trouvé dans le fil ce que tu cherchais, moi j'ai
décroché je ter
propose cette solution, issu de mon experience multi unix, mono script
cat fichier_resultat | uuencode fichier_resultat | mail -s "Salut c'est mon
fichier"
le_destinatiere
ex :
cat photo.jpg | uuencode photo.jpg| mail -s "Salut c'est ma photo"
destinataire1, dest2
et hop le fichier est uuencodé et mis en piece jointe.
donc pour faire simple :
vi $HOME/bin/fic.sh
- -------8<-----------------
#!/bin/sh
###############################################################################
# Role : envoie d'un fichier en piece jointe
#
# Date : JJ/MM/AAAA
#
# Cree par YJB
#
# Modifie par Date Commentaire
#
###############################################################################
if [ ! $# -gt 2 ]; then
echo "Usage : $0 + nom du Fichier(chemin absolu), "
echo " le message associe entre \"\","
echo " les destinataires entre \"\" "
exit 1
fi
# Variables
LEFICHIER=$1
MESSAGE=$2
DESTINATAIRES=$3
if [ ! -e ${LEFICHIER} ]
then
echo "Le fichier ${LEFICHIER} n'existe pas ou plus ;^) "
exit 2
else
cat ${LEFICHIER} | uuencode ${LEFICHIER} | mail -s "${MESSAGE}"
${DESTINATAIRES}
fi
exit 0
# Fin
- ---------8<-----------------------------------
avec un chmod 700 fic.sh
fic.sh photo.jpg "Voila ma photo" "dest1, Dest2, dest"
si ça peut aider ...
a controler ;)
El Manu a écrit :
> Salut les pros,
>
> J'ai un script qui envoie le résultat par mail en utilisant un truc du
> genre :
> mail -s "resultat" [EMAIL PROTECTED] <fichier_resultat
>
> Donc je reçois un mail dont le contenu est le fichier_resultat en
> question
>
> Ma question est toute simple : comment faire pour recevoir ce fichier en
> pièce jointe à un mail vide ??
> Je ne trouve pas dans man mail...
>
>
> A vous les studios ! (merci d'avance)
>
> El Manu
>
>
>
> ------------------------------------------------------------------------
>
> ____________________________________________________
> Want to buy your Pack or Services from Mandriva?
> Go to http://store.mandriva.com
> Join the Club : http://www.mandrivaclub.com
> ____________________________________________________
- --
- --
- -------------------------------------Powered-by----------------------
Yves-Jean Benigni | / / (_)____ __ __ _ __
Administrateur Systèmes&Réseaux | / / / // __ \ / / / /| |/ /
Site : www.Benigni.org | / /___ / // / / // /_/ / > <
E.Mail: [EMAIL PROTECTED] | /_____//_//_/ /_//_____/ /_/\_\
- ----------------------------------------------------------inside-----
<< Si tu ne sais pas, demande. Mais si tu sais, partage. >>
Registered Linux user #343201
Machine has registration #233291
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEmIUyguhQHR19GtMRAtkDAJwJ8wDGZIneycmuMYBUbWHWuUmn6QCfZQ8/
gm7M6C8/ErDEu9J96QdaBRA=
=p428
-----END PGP SIGNATURE-----
____________________________________________________
Want to buy your Pack or Services from Mandriva?
Go to http://store.mandriva.com
Join the Club : http://www.mandrivaclub.com
____________________________________________________