stripping the signature from an email

"@lbutlr" <[email protected]> Tue, 31 May 2016 23:06:09 -0600
Newsgroups gmane.mail.procmail
Message-ID <[email protected]>
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/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail