String replacement with sed
jd
web at 3dresearch.com
Fri Sep 3 16:37:08 PDT 2004
I need to change a bunch of Analog config files; among other things
change the location of IMAGEDIR. I made this simple script:
#!/bin/sh
for loop in `ls analog/*`
do
sed -e
'/IMAGEDIR/s/www2.3dresearch.com\/analog_images\//fiordiligi.3dresearch.com\/images\//p'
$loop > $loop.sed
done
It works fine, except I get duplicate lines, such as:
IMAGEDIR http://fiordiligi.3dresearch.com/images/
IMAGEDIR http://fiordiligi.3dresearch.com/images/
I want just a single line - what do I need to change?
Thank you for your insight...
jd
Janos Dohanics
More information about the freebsd-questions
mailing list