procmail
[Top] [All Lists]

stripping the signature from an email

2016-06-01 00:06:29
I have the following:

:0
{ 
  MSGTEXT=`/usr/local/bin/formail -I ""`
  LOG="1 MSGTEXT=${MSGTEXT}${NL}"
  MSGTEXT=`echo $MSGTEXT | sed '/^-- $/,$d'`
  LOG=“${NL}2 MSGTEXT=${MSGTEXT}${NL}”
…

Which results in:

1 MSGTEXT=
one two three four five
Six seven eight

-- 
It's Tchaikovsky's 'Another One Bites the Dust'," said Crowley, closing
his eyes as they went through Slough.

2 MSGTEXT=one two three four five Six seven eight -- It's Tchaikovsky's 
'Another One Bites the Dust'," said Crowley, closing his eyes as they went 
through Slough.

Shouldn’t the sed strip the signature delimiter and the signature text?

I assume that the echo is condensing the MSGTEXT without passing the newlines?

-- 
Never trust a man who, when left alone in a room with a tea cosy,
doesn't try it on -- Billy Connolly


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>