Forum: CFEngine Help
Subject: Re: filecopy, transform with grep.
Author: davidlee
Link to topic: https://cfengine.com/forum/read.php?3,22985,23015#msg-23015

No, Ben, I'm not wanting to read "resultfile".

There are two files: "sourcefile" and "resultfile".

The UNIX command would be:
   grep -v somestring sourcefile > resultfile
where "sourcefile" is read-only and "resultfile" is write-only.

This seems to be very similar to cfengine's own postfix example:
   postalias /etc/postfix/alias
where (I presume) "/etc/postfix/alias" is read-only and the implicit 
"/etc/postfix/alias.cdb" is write-only.

The only significant difference is that the grep writes to standard output 
rather than to a named file.  So what I am proposing is to have an option for 
cfengine to divert the standard output of the transformer into the promised 
file.  Am I still overlooking something?

Also, the major UNIX paradigm for most commands (the postfix example is a 
strange outlier which fails to follow the normal paradigm) encourages the use 
of stdin and stdout.  My proposed enhancement would allow many more UNIX 
commands to be useable as the 'transformer'.

Does that clarify things?

_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine

Reply via email to