cfengine-like file editing module?

Timothy S. Nelson wayland at smartchat.net.au
Wed Feb 11 04:45:48 CST 2004


	Hi all.  I've been playing with a new sysadmins tool called cfengine 
recently (and any admins on this list should have a look at it).  Anyway, it 
has an editfiles section which does some cool file editing stuff, although 
even the creator agrees the syntax is bad.  Anyway, I was wondering if there 
are any perl modules which allow you to do something like (this is sort of a 
cross between cfengine and perl and pseudocode):

with <filename> {
	ReplaceAll /regex/ With "string"
	IF Exists Line "<line text>" AppendLine "<line text>"
}

	If cfengine sees this, it reads in the file mentioned in filename, and 
performs the listed transforms.  

	Anyway, are there any modules with this stuff built in?  

	Thanks all,

	:)


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayland at smartchat.net.au | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+ s:- a- C++>++++$ U++ P++ L++ E- W+++ N+ w>--- V- Y+>++ 
PGP->++ R !tv b++ DI++++ D+ G e++>++++ h! y-
-----END GEEK CODE BLOCK-----





More information about the Melbourne-pm mailing list