[thelist] OT? Making same modification to large number of files

Shawn K. Quinn skquinn at speakeasy.net
Sat Feb 10 04:10:57 CST 2007


On Fri, 2007-02-09 at 09:58 +0000, Barney Carroll wrote:
> I've been given the odious task of making amendments to a legacy site. 
> It was made in the good old days of 'individually hard code 300 pages'. 
> I need to change a small amount of text in the footer that appears on 
> every single page.
> 
> Anybody know an easy method (maybe unix command?) to achieve this 
> conceptually simple but practically odious task?

Take a look at sed with the -i option. Something like:

$ sed -i.bak -e 's/old moldy stuff/fresh new thing/'

For future reference, you may also want to take a look at Orb:
http://sourceforge.net/projects/orb/

While currently unmaintained, it's still a very useful tool.

-- 
Shawn K. Quinn <skquinn at speakeasy.net>




More information about the thelist mailing list