[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Script bash, lecture fichier "on the fly"



Tu peut recuperer les headers que tu veux en une seule fois, par example:

headers=`egrep "^(To:|Subject:|From:)"|tr " " "_"`|sort -t: -u|xargs
echo "MailPopup $headers"|FvwmCommand -c

(coup de bol: From, Subject et To sont dans le bon ordre alphabetique - le fait que tu
changes les espaces en '_' aide - sinon ca serait un peu plus tordu a cause du echo
apres).

En esperant que ca marche pour toi...

A+, JD.

On Saturday 09 July 2005 01:10, Brice Méalier wrote:
BM > to=`grep -v "\-To"|grep -m 1 "To:"|tr " " "_"`
BM > subject=`grep -m 1 "Subject:"|tr " " "_"`
BM > from=`grep -m 1 "From:"|tr " " "_"`
BM > 
BM > fvwmfunction='MailPopup'\ "$from"\ "$subject"\ "$to"
BM > 
BM > echo "$fvwmfunction"|FvwmCommand -c

-- 
Jean-Damien Durand CERN/IT/ADC/CA - Geneva, Switzerland
PGP PUBLIC KEY: http://home.cern.ch/~jdurand/public_key.asc
This mail is signed using CERN CA, please use my PGP key otherwise
CERN CA root certificate: http://cern.ch/service-grid-ca/crt/root_crt.html

Attachment: smime.p7s
Description: S/MIME cryptographic signature


Reply to: