[squid-users] best way to merge old conf file into the new one so as to update it in place

From: Adam <adam-s@dont-contact.us>
Date: Tue, 10 Jun 2003 15:08:17 -0700

Hello,

How do most of you update your conf file when upgrading to a new version. I
tried diff but that just makes file1 a copy of file2. Is there any
programmatic way of integrating just the changes you've made? I was
thinking of searching for all lines not commented out with a # and then
subbing in my values but it's often not a one-to-one relation. What I
normally do is do a diff on the two squid.conf.default files to see what has
been updated or added. Then I grep for all non-comment lines in the old
squid file and manually add those in at the appropriate places. But I was
thinking that there must be a way to programmatically script diff, patch, or
perl to feed the lines in. Perhaps I would just have to use begin/end tags
in the entire file.

Anyhow if you have a favorite method or if I have overlooked some obvious
use of diff, patch, etc. please let me know. If this has been asked before,
my apologies, I did check the archives and google but didn't see what I was
looking for. Maybe it's just obvious and I misread the man page on diff...

thanks,

Adam
Received on Tue Jun 10 2003 - 16:10:46 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:17:18 MST