Told to us by Craig Kattner ([EMAIL PROTECTED])
on Thu, Apr 16, 1998 at 04:02:51PM +0000

> Specifically, I have large directory structure of html and need to make
> some changes to the whole works in respects of colors and fonts. I am not
> sure how I can go about making these changes in mass, but was thinking
> that there's a simple script out there somewhere that can change all
> instances of say BGCOLOR="#000000" to BGCOLOR="#FFFFFF" etc, etc. Any
> ideas?

While you could do this in perl, that might be overkill if you just need
to do some basic changes...

For just a single file you could do:

    sed s/BGCOLOR="#000000"/BGCOLOR="#FFFFFF"/g filename > /tmp/hold
    cp /tmp/hold filename

Or if you have a bunch of files in a directory:

cd to-the-directory
for i in `ls *.html`
do
    sed s/BGCOLOR="#000000"/BGCOLOR="#FFFFFF"/g $i > /tmp/hold
    cp /tmp/hold $i
done


-- 
==========================================================================
Kevin W. Reed (KWR10)                TNET Service - Disability Systems and
E-Mail: [EMAIL PROTECTED]                                Software Development
WEB: http://www.tnet.com        MAJORDOMO - MAILBOT Administration Account


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to