Name | Modified | Size | Downloads / Week |
---|---|---|---|
muconf.tar.gz | 2012-02-08 | 3.6 kB | |
README | 2012-02-08 | 1.1 kB | |
Totals: 2 Items | 4.7 kB | 0 |
muconf is a simple program that reads from standard input, replaces each substring of the form @IDENTIFIER@ with the value of IDENTIFIER from the environment, and writes the result to standard output. If IDENTIFIER is not found in the environment then @IDENTIFIER@ is replaced with nothing and a warning is sent to stderr. Thus HOME = @HOME@ is replaced with HOME = /Users/johndoe for example. muconf is useful in shell scripts which need to process files. A good example is a configure script that checks to see what compiler or libraries are available for a project. Of course autoconf does this but in a much much much more complex way. A perl script could do what muconf does, but then the project would depend on perl. Usage: muconf < input > output Note that variables must be exported for muconf to see them. Thus in the commands MUTEST=blarg muconf < test.in MUTEST is not exported so muconf knows nothing about it and will complain when it is encountered. On the other hand in the shell code MUTEST=blarg muconf < test.in MUTEST is exported when the shell runs muconf and so muconf recognizes it.