According to Brian White:
> Whenever I need to use sed with a path, I always use "|" instead of "/":
> 
> sed -e "s|^CONFIG_DIR=.*|CONFIG_DIR=/stick/your/path/here|" < 
> CONFIG >CONFIG.new
> mv CONFIG.new CONFIG
> 
> At 10:48 11/07/2001 -0400, Geoff Hutchison wrote:
> >On Wed, 11 Jul 2001 [EMAIL PROTECTED] wrote:
> >
> > > Waht i mean is: i don't want to edit the CONFIG-file during the 
> > installation -
> > > this must run itself.
> >
> >Use 'sed.'
> >
> >e.g.
> >
> >echo "s/^CONFIG_DIR=.*/CONFIG_DIR=\/path/" >pattern
> >sed -f pattern CONFIG >CONFIG.new
> >mv CONFIG.new CONFIG
> >rm pattern
> >
> >(There's probably a way to escape everything for using sed's -e command,
> >but I often miss something or other and prefer to use a temporary file.)


Another option would be to use a patch file and the patch command to apply
any "edits" to files from a script.  This is what I do in the .spec file
for the htdig-3.1.5 RPM package.

-- 
Gilles R. Detillieux              E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre       WWW:    http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a 
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html

Reply via email to