If you do it as root, you shouldn't have to worry about ownership atQuote:> Wondering if anyone could help -- I would like to "brand" all .htm and .html
> class file , regardless of ownwership (or by changing ownwership to root then
> back to owner again )does anyone know a way of "writing" this line of code to
> html pages??? without destorying the existing page (tried the << 'filename'
> but it barfed on ownership's) my linux script knowedge is minimal :( Thanks
all. Try something like this...
echo "your stuff goes here" >> /foo/bar/yourpage.html
As for scripting it, you want a script to do several things:
-find all pages named *.htm and *.html
-see if they're already branded
-add the brand if they aren't
It might look something like this: (this is just pseudo-code, not anything
that will actually run)
for PAGE in (`locate .htm`)
grep "your stuff goes here" $PAGE || echo "your stuff goes here" >> $PAGE
Having said that, though, I think you might be going
about things the wrong way. I assume you're using Apache,
and I'm pretty sure Apache has a way to dynamically add
content to every page it serves.