Forum: CFEngine Help Subject: Re: filecopy, transform with grep. Author: bbomgardner Link to topic: https://cfengine.com/forum/read.php?3,22985,23007#msg-23007
My first thoughts on this are that Mark's intent for transformers were for them to be small helper commands that would make some attribute change (but not edit) to the promiser. As such, they needed no shell overhead and as a result no pipes or redirection. You can certainly use grep -v as a command promise and run it in a shell to redirect as you desire. There isn't anything wrong with this, it just might not align with some cfengine principles. What you are really doing is a file edit, something that cfengine philosophy desires to make as "atomic" as possible to avoid conflicts with other changes. There is also a desire for cfengine to be as free from other system dependencies as possible, in this case even the most common grep and sh. Your skeptic colleagues may enjoy reading some of Mark's essays regarding cfengine and promise theory (in the engine room) - it certainly helped me see some of the reasons behind why cfengine takes many lines of code to accomplish something that could also be accomplished with a sed/awk/grep/perl one-liner (hint: knowledge transfer is a big reason). _______________________________________________ Help-cfengine mailing list [email protected] https://cfengine.org/mailman/listinfo/help-cfengine
