David T-G <[EMAIL PROTECTED]> said something to this effect on 11/16/2001: > Darren & Dan -- > > ...and then darren chamberlain said... > % Dan Boger <[EMAIL PROTECTED]> said something to this effect on 11/16/2001: > % > On Fri, Nov 16, 2001 at 01:31:30PM -0500, David T-G wrote: > % > perl -i -n -e 's/^/- /;' $1 > % > > % > something like this? :) > % > % Close! > % > % perl -i -pe 's/^/- /' $1 > > Yes; thanks much to both of you. Now throw in a matching clause that > will trap $4 out of the subject line and print a new "CC:" line to it > and he'll be done :-)
Hm.. slightly more complex, but still doable: perl -i -ane '/^Subject:/ && print "Cc: $F[4]\n";print' $1 ... I think (haven't tested it on a mail message, but it works on random text files). I don't remember the format fo the original example Subject line; the $F[4] might need to be $F[3]. (darren) -- The final delusion is that belief that one has lost all delusions. -- Maurice Chapelain