Project

General

Profile

Actions

Bug #5979

closed

Document usage of line replacement in Enforce a file content technique

Added by Dennis Cabooter over 6 years ago. Updated about 6 years ago.

Status:
Released
Priority:
1
Category:
Techniques
Target version:
Severity:
User visibility:
Effort required:
Priority:

Description

Situation:

In file /etc/sysctl.conf:

node 1 has: kernel.shmmax = 1234
node 2 has: kernel.shmmax = 4321
node 3 has: kernel.shmmax = 2143

Actually the value could be anything. And I don't (want to) know what is is.

Now I want to accomplish this:

node 1 has: kernel.shmmax = 5678
node 2 has: kernel.shmmax = 5678
node 3 has: kernel.shmmax = 5678

What I need here is one simple regex that matches:

All lines in sysctl.conf, which start with "kernel.shmmax", followed by a space, followed by an = sign, followed by a space, followed by a number I don't know.

Please provide documentation on how to do this.


Related issues

Has duplicate Rudder - Bug #6431: How to line replacement in Enforce a file content RejectedNicolas CHARLES2015-03-24Actions
Actions

Also available in: Atom PDF