help-cfengine
[Top][All Lists]
Advanced

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

Adding contents of a file to another


From: Chip Seraphine
Subject: Adding contents of a file to another
Date: Tue, 29 Apr 2003 14:10:05 -0500
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121


I have a text file (file A) that contains a list items, one two a line. I wish to add any line in this file to file B unless that line is already present. What would really make me happy was if there were a special variable that evaluated to whatever SetLine was currently set to; that way I could do this:

editfiles:
       {   /path/to/file/B
               ForEachLineIn "/path/to/file/A"
                   AppendIfNoLineMatching "$(imaginary_special_variable)"
               EndLoop
       }

Given that no such $(imaginary_special_variable) exists, does anybody know of a good cfenginey way to do this in editfiles? I am trying to avoid copping out and using modules or scripts if I can help it.

Thanks....

--

It is by caffeine alone that I set my mind in motion. It is by
the coffee that the thoughts acquire speed, the teeth acquire
stains, the stains become a warning. It is by caffeine alone
that I set my mind in motion.






reply via email to

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