diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-05 22:26:11 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2014-12-05 22:26:11 +0000 |
commit | 90b12bd71bb9fc79a4640b9112c13ef529d0196a (patch) | |
tree | 523b3f4ee2969e7a729bab2ba749c4b924ae62af /doc/s6-envdir.html | |
download | s6-90b12bd71bb9fc79a4640b9112c13ef529d0196a.tar.xz |
Initial commit
Diffstat (limited to 'doc/s6-envdir.html')
-rw-r--r-- | doc/s6-envdir.html | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/doc/s6-envdir.html b/doc/s6-envdir.html new file mode 100644 index 0000000..5ac92e2 --- /dev/null +++ b/doc/s6-envdir.html @@ -0,0 +1,66 @@ +<html> + <head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta http-equiv="Content-Language" content="en" /> + <title>s6: the s6-envdir program</title> + <meta name="Description" content="s6: the s6-envdir program" /> + <meta name="Keywords" content="s6 command s6-envdir dir environment modification" /> + <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> --> + </head> +<body> + +<p> +<a href="index.html">s6</a><br /> +<a href="http://skarnet.org/software/">Software</a><br /> +<a href="http://skarnet.org/">skarnet.org</a> +</p> + +<h1> The s6-envdir program </h1> + +<p> +s6-envdir changes its environment, then executes into another program. +</p> + +<h2> Interface </h2> + +<pre> + s6-envdir [ -I | -i ] [ -n ] [ -f ] [ -c <em>nullis</em> ] <em>dir</em> <em>prog...</em> +</pre> + +<ul> + <li> s6-envdir reads files in <em>dir</em>. For every file <em>f</em> in <em>dir</em>, +that does not begin with a dot and does not contain the '=' character: </li> + <li> If <em>f</em> is empty, remove a variable named <em>f</em> from the environment, if any. </li> + <li> Else add a variable named <em>f</em> to the environment (or replace <em>f</em> if it +already exists) with the first line of the contents of file <em>f</em> as value. +Spaces and tabs at the end of this line are removed; +null characters in this line are changed to newlines in the environment variable.</li> +</ul> + +<h2> Options </h2> + +<ul> + <li> <tt>-i</tt> : strict. If <em>dir</em> does not exist, exit 111 with an +error message. This is the default. </li> + <li> <tt>-I</tt> : loose. If <em>dir</em> does not exit, exec into +<em>prog</em> without modifying the environment first. </li> + <li> <tt>-f</tt> : verbatim mode. All the file is given as the value of the +environment variable, including newlines (except the last one if the <tt>-n</tt> +option is not given). Null characters are still translated. </li> + <li> <tt>-n</tt> : do not chomp. If the <tt>-f</tt> option is given and the +file ends with a newline, keep that last newline in the value. If the <tt>-f</tt> +option is not given, keep the trailing blanks at the end of the first line (but +not the ending newline). </li> + <li> <tt>-c</tt> <em>nullis</em> : replace null characters with the +first character of <em>nullis</em> instead of a newline. </li> +</ul> + +<h2> Notes </h2> + +<p> + s6-envdir without options behaves exactly like +<a href="http://cr.yp.to/daemontools/envdir.html">envdir</a>. +</p> + +</body> +</html> |