help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Deleting lines in a file from configuration files with editfiles


From: Berthold Cogel
Subject: Deleting lines in a file from configuration files with editfiles
Date: Thu, 15 Dec 2005 13:28:20 +0100
User-agent: Mozilla Thunderbird 1.0.6-1.4.1.SL3 (X11/20050721)

Hello!

I'm looking for a method to delete lines that I can not describe with a string or a regex in a cfengine script.

For example:

I want to edit root's authorized_keys file. I want to distribute ssh public keys with cfengine. It is not a problem to collect the keys and append them to authorized_keys. But I would also like to revoke keys by distributing them in a single file.

I need something like 'DeleteLinesMatchingFromFile', 'DeleteLinesContainingFileItems' or 'Delete "ThisLine".

Of course I can rebuild the file from scratch with cfengine. But there are situations where I don't want to do this.

Regards,

Berthold




reply via email to

[Prev in Thread] Current Thread [Next in Thread]