Re: Troubleshoot recipe to prevent repeating footer

"David W. Tamkin" <[email protected]>
Newsgroups gmane.mail.smartlist.user
Message-ID <000801c2c36d$e880c540$21985742@ord351473>
Jo asked,

| Works great, but also seems to need at least 2 lines in the footer. Is there
| a way to make it work for a one line footer?

To make it work for exactly a one-line footer, sure:

 TEXT=`cat footer.txt`

but to make it look for the second line of a file with two or more lines but
the only line in a one-line file would be nasty in sed.  Pick your poison:

 TEXT=`sed -e\$q -e1d -eq footer.txt`
or
 TEXT=`sed -e2q -e\$q -ed footer.txt`

Another way to deal with a one-line footer is to add a blank line above it so
that it now is a two-line footer (with a blank first 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.