Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #243629

Re: Replace line in file based on pattern

From "Paul M. Foster" <paulf@quillandmouse.com>
Newsgroups linux.debian.user
Subject Re: Replace line in file based on pattern
Date 2022-01-03 14:40 +0100
Message-ID <DBvJ8-u8-13@gated-at.bofh.it> (permalink)
References <DBi9c-Mv-5@gated-at.bofh.it> <DBisy-SG-3@gated-at.bofh.it> <DBiLU-Z6-3@gated-at.bofh.it> <DBlJL-2Fl-1@gated-at.bofh.it> <DBmPv-3CQ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 1/2/22 11:03 PM, Greg Wooledge wrote:
> On Sun, Jan 02, 2022 at 09:59:08PM -0500, Paul M. Foster wrote:
>> Regarding "patch", let's consider a "stock" config file from a fresh install
>> (call it NEW), and an existing config which is tweaked for my purposes (call
>> it OLD). Assume I want the stock config altered to conform to my
>> existing/working installation.
> 
> If you're reinstalling after a disk or system failure, you should be
> able to drop the config files from your backup onto the system, either
> before or after you install the software packages that use those files.

This is a fair point. In the case of a hardware failure, simply 
reinstalling working configs over the top of "stock" ones would work fine.

> 
> The scenario you seem to be imagining involves reinstalling software
> packages and somehow ending up with a *different* version of the software
> than you had been running on the failed system.  This isn't going
> to happen if you were running Debian stable, and you reinstall Debian
> stable.
> 
> The only way it would be a concern is if you're *not* running Debian
> stable, or if you reinstall with something other than Debian stable.
> In those cases, well, you're kinda on your own.

I am running stable. Where this situation arises is when I've been 
running for a couple of years and Debian changes to a new version (10 to 
11, for example). By that time, I have a lot of cruft on the machine, 
and I've just found it best to reinstall. And I've had it happen where a 
package changes its config, and I have to manually figure out what 
they've done, and how to compensate for it, to get back to a "working" 
(for me) state.

There are a lot of folks who like to "fiddle" with their systems 
constantly. I don't. So I'm not keen on having to manually fiddle with a 
lot of configs after an O/S version change.

Paul

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Replace line in file based on pattern "Paul M. Foster" <paulf@quillandmouse.com> - 2022-01-03 00:10 +0100
  Re: Replace line in file based on pattern Andy Smith <andy@strugglers.net> - 2022-01-03 00:20 +0100
    Re: Replace line in file based on pattern "Paul M. Foster" <paulf@quillandmouse.com> - 2022-01-03 03:00 +0100
  Re: Replace line in file based on pattern The Wanderer <wanderer@fastmail.fm> - 2022-01-03 00:30 +0100
    Re: Replace line in file based on pattern Greg Wooledge <greg@wooledge.org> - 2022-01-03 00:50 +0100
      Re: Replace line in file based on pattern The Wanderer <wanderer@fastmail.fm> - 2022-01-03 02:20 +0100
        Re: Replace line in file based on pattern Greg Wooledge <greg@wooledge.org> - 2022-01-03 02:50 +0100
          Re: Replace line in file based on pattern "Paul M. Foster" <paulf@quillandmouse.com> - 2022-01-03 03:30 +0100
            Re: Replace line in file based on pattern Andrei POPESCU <andreimpopescu@gmail.com> - 2022-01-15 13:40 +0100
      Re: Replace line in file based on pattern "Paul M. Foster" <paulf@quillandmouse.com> - 2022-01-03 04:00 +0100
        Re: Replace line in file based on pattern Greg Wooledge <greg@wooledge.org> - 2022-01-03 05:10 +0100
          Re: Replace line in file based on pattern "Paul M. Foster" <paulf@quillandmouse.com> - 2022-01-03 14:40 +0100
            Re: Replace line in file based on pattern David Wright <deblis@lionunicorn.co.uk> - 2022-01-04 20:50 +0100
    Re: Replace line in file based on pattern "Paul M. Foster" <paulf@quillandmouse.com> - 2022-01-03 03:00 +0100
      Re: Replace line in file based on pattern john doe <johndoe65534@mail.com> - 2022-01-03 07:50 +0100

csiph-web