Dave, et al -- ...and then David Yitzchak Cohen said... % % Okay, okay: % % #!/bin/sh ... % if egrep "^To:.* blah@xxxxxxx" >&/dev/null ; then % blah_goo_gaa=1 % fi % % if egrep "^To:.* wawa@xxxxxxxx" >&/dev/null ; then % wawa_mama_dad=1 % fi % % if [ "$blah_goo_gaa$wawa_mama_dad" = "11" ] ; then % echo -e "1i\nFcc: =sent-mail\n.\nwq" | ed $file That's a nice trick; you could build a whole byte worth of these flag bits if you were so [crazily] inclined. And ed is probably a good way to go, since you can't just append to the end. % elsif [ "$blah_goo_gaa" ] ; then % echo -e "1i\nFcc: =blah_goo_gaa\n.\nwq" | ed $file % elsif [ "$wawa_mama_dad" ] ; then % echo -e "1i\nFcc: =wawa_mama_dad\n.\nwq" | ed $file % fi Whoops! I wouldn't bother with these. Let the regular fcc-[save-]hooks handle the straightforward stuff. % % vi $file Down with emacs! Oops; wrong thread. HTH & HAND & Happy New Year :-D -- David T-G * There is too much animal courage in (play) davidtg@xxxxxxxxxxxxxxx * society and not sufficient moral courage. (work) davidtgwork@xxxxxxxxxxxxxxx -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg!
Attachment:
pgpv7rvflJf6R.pgp
Description: PGP signature