help-cfengine
[Top][All Lists]
Advanced

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

adding lines based on field match (or lack thereof)


From: Shannon Lee
Subject: adding lines based on field match (or lack thereof)
Date: 24 Oct 2001 14:33:33 -0700

i'm trying to use the editfiles function to distribute and maintain a
standard password file.  this file is going to hosts running various
platform OSes, and which have various "host specific" or "class
specific" users in addition to the set of users in the standard passwd
file i'm distributing.

i'd like to use something like

        SplitOn ":"

        ForEachLineIn "/usr/local/etc/passwd.local"
           ReplaceLinesMatchingField "1"
           AppendIfNoLineMatchingField "1"
        EndLoop

of course, the 'AppendIfNoLineMatchinField' function doesn't exist; i
wonder how i'd go about doing this?

i found a similar query in the archive for February 1999, below... but i
didn't see any responses.

http://mail.gnu.org/pipermail/help-cfengine/1999-February/001622.html

-- 
--shannon

--
    -----------------------------------
     Shannon Lee - shannon@scatter.com
         *    *    *    *    *    *
     I _said_, "i've got a big stick."
    -----------------------------------



reply via email to

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