Re: Troubleshoot recipe to prevent repeating footer

"David W. Tamkin" <[email protected]>
Newsgroups gmane.mail.smartlist.user
Message-ID <00e401c2c359$78e9f760$21985742@ord351473>
Jo wrote,

|     I plucked this recipe from the FAQ's for rc.local.s20. It
|     isn't working at all - no footers are getting inserted.

Actually, it might be working too well and preventing the footer from being
inserted.

|     Can you also explain how much of the footer.txt files this
|    'pulls in' to compare against the message?

Apparently it looks for the second line of the footer file, without anchors.
If the second line of the footer is blank, no message will ever get a footer.

|     TEXT=`sed -n '2 p' <footer.txt`

YECCH.  Far better,

 TEXT=`sed -e1d -eq footer.txt`

|     :0 fbBw
|     * $ ! $\TEXT
|     | cat - footer.txt

At the least, make the condition

  * $ ! ()\<$\TEXT$

so that a hit prevents adding the footer only if it begins with the start of a
word and ends at the end of the line.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.