Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Apr 1998 14:55:56 -0500 (CDT)
From:      Jeff Lynch <jeff@mercury.jorsm.com>
To:        freebsd-isp@FreeBSD.ORG
Subject:   RE: Adding footers automatically to served HTML pages
Message-ID:  <Pine.BSF.3.95q.980429144554.20475A-100000@mercury.jorsm.com>
In-Reply-To: <Pine.BSF.3.96.980429173915.12700C-100000@chain>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 29 Apr 1998, Khetan Gajjar wrote:

> On Wed, 29 Apr 1998, Stunt Pope wrote:
> 
> >You could turn on SSI's (Server Side Includes) and then use
> >
> ><!--#include footer.html-->
> 
> They are on, but it means adding that line into all the pages,
> and force myself to add them onto any new pages I have.
> 
> I'll have to explore the Add Handler option which someone
> else pointed out.

Aw c'mon. It's not so bad....

#!/bin/sh
for i in `find <docroot> -name '*.htm*' -print`
do
 cat $i | sed 's%</BODY>%<!--#include footer.html--></BODY>%' > $i.tmp
 mv $i.tmp $i
done

You can get fancier with the sed command but hopefully this will
give you some ideas. Awk, perl, sed, sh are your friends.

=========================================================================
Jeffrey A. Lynch			      JORSM Internet
email: jeff@jorsm.com		Northwest Indiana's Full-Service Provider
Voice: (219)322-2180		   927 Sheffield Avenue, Dyer, IN 46311
Autoresponse: info@jorsm.com		   http://www.jorsm.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.980429144554.20475A-100000>