On Du, 02 ian 22, 21:22:33, Paul M. Foster wrote:
>
> I'm not interested in hacking a bunch of servers. Just one. The whole
> purpose here is to restore a system to more or less its original
> configuration when a reinstall must occur. A reinstall must occur when there
> is a severe hardware failu
On Mon 03 Jan 2022 at 08:38:32 (-0500), Paul M. Foster wrote:
> 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
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 conf
On 1/3/2022 2:56 AM, Paul M. Foster wrote:
On 1/2/22 6:20 PM, The Wanderer wrote:
On 2022-01-02 at 17:52, Paul M. Foster wrote:
Folks:
In a script, I'd like to search for a pattern in a file, and replace
that line entirely with a new line, once (not globally). I've tried
What do you mean by
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
On 1/2/22 6:40 PM, Greg Wooledge wrote:
On Sun, Jan 02, 2022 at 06:20:15PM -0500, The Wanderer wrote:
Of course, given the ORIGINAL question, the best tool is neither of these.
It's something like ansible or puppet. Or if you insist on jury-rigging
crap together with stone knives and bearskin
On 1/2/22 8:46 PM, Greg Wooledge wrote:
I'm rearranging the order of the quoted sections.
On Sun, Jan 02, 2022 at 08:14:47PM -0500, The Wanderer wrote:
That's very interesting, although not all that accessible to the
relative newcomer to the field. It does leave me sad about the apparent
conclu
On 1/2/22 6:20 PM, The Wanderer wrote:
On 2022-01-02 at 17:52, Paul M. Foster wrote:
Folks:
In a script, I'd like to search for a pattern in a file, and replace
that line entirely with a new line, once (not globally). I've tried
What do you mean by "globally"?
"Globally" just means I want
On 1/2/22 6:18 PM, Andy Smith wrote:
Hello,
On Sun, Jan 02, 2022 at 05:52:36PM -0500, Paul M. Foster wrote:
In a script, I'd like to search for a pattern in a file, and replace that
line entirely with a new line, once (not globally). I've tried
sed -i s/search/new_line/
but this only replaces
I'm rearranging the order of the quoted sections.
On Sun, Jan 02, 2022 at 08:14:47PM -0500, The Wanderer wrote:
> That's very interesting, although not all that accessible to the
> relative newcomer to the field. It does leave me sad about the apparent
> conclusion that there is no safe way to edi
On 2022-01-02 at 18:40, Greg Wooledge wrote:
> On Sun, Jan 02, 2022 at 06:20:15PM -0500, The Wanderer wrote:
>
>> If you mean that you want to only replace the first matching line
>> in the file, but leave any subsequent matching lines alone... I've
>> never actually had occasion to do that, but
On Sun, Jan 02, 2022 at 06:20:15PM -0500, The Wanderer wrote:
> If you mean that you want to only replace the first matching line in the
> file, but leave any subsequent matching lines alone... I've never
> actually had occasion to do that, but a bit of Googling (for 'sed first
> match only') found
On 2022-01-02 at 17:52, Paul M. Foster wrote:
> Folks:
>
> In a script, I'd like to search for a pattern in a file, and replace
> that line entirely with a new line, once (not globally). I've tried
What do you mean by "globally"?
If you mean that you want to only replace the first matching line
Hello,
On Sun, Jan 02, 2022 at 05:52:36PM -0500, Paul M. Foster wrote:
> In a script, I'd like to search for a pattern in a file, and replace that
> line entirely with a new line, once (not globally). I've tried
>
> sed -i s/search/new_line/
>
> but this only replaces the string itself. I want t
14 matches
Mail list logo