On Wed, Jun 11, 2003 20:23:33 at 08:23:33PM +0200, Patrick (shrike@xxxxxxxxxxxxxxxxx) wrote: > Hi, > > After converting various gifs to png I still need to replace all > references to <pic>.gif in several html files to <pic>.png. Is there an > easy way to do this other than manually? Some sed/awk magic anyone? > In Perl, for each HTML file, you would do on the command line: perl -pi.bak -e 's/\.gif\b/.png/g;' the_file.html this will first create a backup copy named the_file.html.bak, then find all the strings _ending_ in .gif, and replace that with .png . Try on disposable copies before going for it, however, and remember than the recipe above is case sensitive, will ignore .GIF, .Gif, etc.. HTH, Marco Fioretti -- Marco Fioretti m.fioretti, at the server inwind.it Red Hat for low memory http://www.rule-project.org/en/ Reality is an illusion - perception is what counts.