mutt & send hook
Hi,
I have got the following in my muttrc :
set default_hook="~C %s"
send-hook ! ^(howtos|linux-india|debian-user|ilug-goa|icewm)
"set editor='/usr/local/bin/rajeshsign.sh'"
send-hook ^(howtos|linux-india|debian-user|ilug-goa|icewm)
"set editor='/usr/local/bin/lostsign.sh'"
( Each send-hook is on one line )
What I want is if the CC or TO address is of the mailing lists than execute
lostsign.sh script else execute rajeshsign.sh.
--------------------------------------------------------------------------
rajeshsign.sh is :
INFILE=$1
echo -en "\n\n\n" >> $INFILE
cat $HOME/.rajeshsign >> $INFILE
fortune -s >> $INFILE
vi $INFILE
rm -rf $INFILE
--------------------------------------------------------------------------
--------------------------------------------------------------------------
lostsign.sh is :
INFILE=$1
echo -en "\n\n\n" >> $INFILE
cat $HOME/.rajeshsign >> $INFILE
fortune /usr/share/games/fortunes/lost >> $INFILE
vi $INFILE
rm -rf $INFILE
--------------------------------------------------------------------------
But whenever I start to type any mail and than quit vi I get the message as
message is unmodifed ? This happens inspite of my typing the
contents in the mail. If I say yes I come to the screen where I have to
send the mail,( presss y ), However the mail is empty ??
Any problems with my script ?
Thanks in advance.
Warm Regards
--
Rajesh
:
####[ Linux One Stanza Tip (LOST) ]###########################
Sub : Steps for kernel compilation LOST #087
1. #cd /usr/src/linux 2. #make mrproper 3. #make menuconfig
4. #make dep 5. #make clean 6. #make modules
7. #make install 8. #make modules_install
Change /etc/lilo.conf and than run lilo -v
For detailed explaination refer to Kernel-HOWTO.
####<hsejar@gmx.co.uk>########################################
Reply to: