diff options
Diffstat (limited to 'doc')
39 files changed, 320 insertions, 347 deletions
diff --git a/doc/background.html b/doc/background.html index 8656b04..f06de3d 100644 --- a/doc/background.html +++ b/doc/background.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the background command</title> - <meta name="Description" content="execline: the background command" /> - <meta name="Keywords" content="execline command background" /> + <title>execline: the & command</title> + <meta name="Description" content="execline: the & command" /> + <meta name="Keywords" content="execline command &" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,9 +16,9 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>background</tt> program </h1> +<h1> The <tt>&</tt> program </h1> -<tt>background</tt> launches a command in the background, then goes on +<tt>&</tt> launches a command in the background, then goes on with the execution flow. <h2> Interface </h2> @@ -28,11 +28,11 @@ with the execution flow. </p> <pre> - background [ -d ] { <em>prog1...</em> } <em>prog2...</em> + & [ -d ] { <em>prog1...</em> } <em>prog2...</em> </pre> <ul> - <li> <tt>background</tt> reads a <em>prog1...</em> command in a + <li> <tt>&</tt> reads a <em>prog1...</em> command in a <a href="el_semicolon.html">block</a> and unquotes it. </li> <li> It spawns a child executing <em>prog1...</em>. </li> <li> It sets the <tt>!</tt> environment @@ -44,13 +44,13 @@ variable to the pid of the <em>prog1...</em> process. </li> <ul> <li> <tt>-d</tt> : doublefork. If the <tt>-d</tt> option is set, -<em>prog1...</em> will run as a grandchild of <tt>background</tt>. </li> +<em>prog1...</em> will run as a grandchild of <tt>&</tt>. </li> </ul> <h2> Notes </h2> <ul> - <li> <tt>background <em>prog1...</em> "" <em>prog2...</em></tt> is + <li> <tt>& <em>prog1...</em> "" <em>prog2...</em></tt> is equivalent to <tt>sh -c '<em>prog1...</em> & ; exec <em>prog2...</em>'</tt>. </li> </ul> diff --git a/doc/backtick.html b/doc/backtick.html index b1e2870..9045629 100644 --- a/doc/backtick.html +++ b/doc/backtick.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the backtick command</title> - <meta name="Description" content="execline: the backtick command" /> - <meta name="Keywords" content="execline command backtick" /> + <title>execline: the ` command</title> + <meta name="Description" content="execline: the ` command" /> + <meta name="Keywords" content="execline command `" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,10 +16,10 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>backtick</tt> program </h1> +<h1> The <tt>`</tt> program </h1> <p> -<tt>backtick</tt> runs a program and stores its output in an +<tt>`</tt> runs a program and stores its output in an environment variable, then executes another program. </p> @@ -30,15 +30,15 @@ environment variable, then executes another program. </p> <pre> - backtick [ -i | -I | -D <em>default</em> ] [ -n ] <em>variable</em> { <em>prog1...</em> } <em>prog2...</em> + ` [ -i | -I | -D <em>default</em> ] [ -n ] <em>variable</em> { <em>prog1...</em> } <em>prog2...</em> </pre> <ul> - <li> <tt>backtick</tt> reads <em>prog1...</em> in a + <li> <tt>`</tt> reads <em>prog1...</em> in a <a href="el_semicolon.html">block</a> and unquotes it. </li> <li> It runs <em>prog1...</em> as a child process and saves its output in memory. This output must not contain a null character. </li> - <li><tt>backtick</tt> execs into <em>prog2...</em>, with + <li><tt>`</tt> execs into <em>prog2...</em>, with <em>variable</em> added to the environment with <em>prog1...</em>'s output as a value. </li> </ul> @@ -51,14 +51,14 @@ output. </li> </ul> <p> - The other options tell backtick what to do if <em>prog1...</em>'s output + The other options tell ` what to do if <em>prog1...</em>'s output is not suitable as the contents of an environment variable (i.e. it contains a null character) or if <em>prog1...</em> crashes or exits nonzero: </p> <ul> - <li> <tt>-i</tt> : backtick exits 1. </li> + <li> <tt>-i</tt> : ` exits 1. </li> <li> <tt>-I</tt> : <em>variable</em> is <strong>removed</strong> from the environment, and execution proceeds. </li> <li> <tt>-D <em>default</em></tt> : the value of <em>variable</em> @@ -72,7 +72,7 @@ then execution proceeds. </li> <h2> Notes </h2> <ul> - <li> You can start <em>prog2...</em> with "importas -u <em>variable</em> <em>variable</em>" + <li> You can start <em>prog2...</em> with "$ -u <em>variable</em> <em>variable</em>" to perform variable substitution. </li> </ul> diff --git a/doc/componentsb.txt b/doc/componentsb.txt index c65e2e1..c2b672e 100644 --- a/doc/componentsb.txt +++ b/doc/componentsb.txt @@ -4,7 +4,7 @@ # silly things on the standard output. -foreground # an unquoted string, evaluated to: foreground +; # an unquoted string, evaluated to: ; { # A single opening brace, not included in the argv sleep 1 # Two unquoted strings, evaluated to " sleep" and " 1" # (without the quotation marks). @@ -31,7 +31,7 @@ baz"$1"qux # This will evaluate to the word baz$1qux baz\$1qux # Same here baz$1qux # Same here in execline-1.y -${PATH} # This will NOT be replaced by execline ; use the importas command +${PATH} # This will NOT be replaced by execline ; use the $ command # if you need the $PATH value. 'this is not a string' # it will be parsed as five separate words diff --git a/doc/define.html b/doc/define.html index 4c09c4c..83f6621 100644 --- a/doc/define.html +++ b/doc/define.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the define command</title> - <meta name="Description" content="execline: the define command" /> - <meta name="Keywords" content="execline command define" /> + <title>execline: the = command</title> + <meta name="Description" content="execline: the = command" /> + <meta name="Keywords" content="execline command =" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,27 +16,27 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>define</tt> program </h1> +<h1> The <tt>=</tt> program </h1> <p> -<tt>define</tt> replaces a literal with a value, then executes +<tt>=</tt> replaces a literal with a value, then executes another program. </p> <h2> Interface </h2> <pre> - define [ -s ] [ -C | -c ] [ -n ] [ -d <em>delim</em> ] <em>variable</em> <em>value</em> <em>prog...</em> + = [ -s ] [ -C | -c ] [ -n ] [ -d <em>delim</em> ] <em>variable</em> <em>value</em> <em>prog...</em> </pre> <ul> - <li> <tt>define</tt> performs + <li> <tt>=</tt> performs <a href="el_substitute.html">variable substitution</a> on <em>prog...</em>, using <em>variable</em> as key and <em>value</em> as value. -<tt>define</tt>'s options are used to <a href="el_transform.html">control +<tt>=</tt>'s options are used to <a href="el_transform.html">control the substitution mechanism</a>. </li> - <li> <tt>define</tt> then execs into the modified <em>prog...</em>. </li> + <li> <tt>=</tt> then execs into the modified <em>prog...</em>. </li> </ul> </body> diff --git a/doc/dollarat.html b/doc/dollarat.html index 8249bd3..d9346fa 100644 --- a/doc/dollarat.html +++ b/doc/dollarat.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the dollarat command</title> - <meta name="Description" content="execline: the dollarat command" /> - <meta name="Keywords" content="execline command dollarat" /> + <title>execline: the $@ command</title> + <meta name="Description" content="execline: the $@ command" /> + <meta name="Keywords" content="execline command $@" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,28 +16,28 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>dollarat</tt> program </h1> +<h1> The <tt>$@</tt> program </h1> <p> -<tt>dollarat</tt> prints the positional parameters of an execline script. +<tt>$@</tt> prints the positional parameters of an execline script. </p> <h2> Interface </h2> <pre> - dollarat [ -n ] [ -0 | -d <em>delimchar</em> ] + $@ [ -n ] [ -0 | -d <em>delimchar</em> ] </pre> <ul> - <li> <tt>dollarat</tt> reads the number <em>n</em> of "positional + <li> <tt>$@</tt> reads the number <em>n</em> of "positional parameters" in the <tt>#</tt> environment variable. If that variable -is not set or does not contain a valid <em>n</em>, <tt>dollarat</tt> +is not set or does not contain a valid <em>n</em>, <tt>$@</tt> exits 100. </li> - <li> <tt>dollarat</tt> prints the value of the <tt>1</tt> environment + <li> <tt>$@</tt> prints the value of the <tt>1</tt> environment variable, then <em>delimchar</em>, then the value of the <tt>2</tt> environment variable... and so on until <tt><em>n</em></tt>. If one of -these variables is not set, <tt>dollarat</tt> exits 100. </li> - <li> If everything runs OK, <tt>dollarat</tt> exits 0. This makes it +these variables is not set, <tt>$@</tt> exits 100. </li> + <li> If everything runs OK, <tt>$@</tt> exits 0. This makes it one of the rare "exiting" execline commands. </li> </ul> @@ -49,7 +49,7 @@ one of the rare "exiting" execline commands. </li> <li> <tt>-d</tt> <em>delimchar</em> : use the character <em>delimchar</em> as separator between the arguments. Default: <tt>\n</tt>. If <em>delimchar</em> has more than one character, only the first one is -used. If <em>delimchar</em> is the empty string, then <tt>dollarat</tt> +used. If <em>delimchar</em> is the empty string, then <tt>$@</tt> will output the positional parameters as a <a href="el_transform.html#netstrings">sequence of netstrings</a> (and the <tt>-n</tt> option will be ignored). </li> @@ -61,12 +61,16 @@ data to programs that know how to handle null-separated lists. </li> <h2> Notes </h2> <ul> - <li> You can use <tt>dollarat -d ""</tt> along with the + <li> The <tt>$@</tt> word gets interpreted by execline as the list of +all positional parameters. To make sure it's not substituted, and +correctly refers to the <tt>$@</tt> command, make sure to escape the +<tt>$</tt> character in execline scripts: <tt>\\$@</tt>. </li> + <li> You can use <tt>$@ -d ""</tt> along with the <a href="forbacktickx.html">forbacktickx</a> command to reliably loop over the positional parameters: <pre> #!/command/execlineb - forbacktickx -d "" ARG { dollarat -d "" } + forbacktickx -d "" ARG { \\$@ -d "" } dosomething $ARG </pre> @@ -78,7 +82,7 @@ or other fancy characters. </li> use a null-separated list, which will work the same way: <pre> #!/command/execlineb - forbacktickx -0 ARG { dollarat -0 } + forbacktickx -0 ARG { \\$@ -0 } dosomething $ARG </pre> </li> </ul> diff --git a/doc/el_pushenv.html b/doc/el_pushenv.html index d22ce9d..4c63dcc 100644 --- a/doc/el_pushenv.html +++ b/doc/el_pushenv.html @@ -94,7 +94,7 @@ printing the list of its arguments. <pre> #!/command/execlineb elgetpositionals - foreground { echo $0 $@ } + ; { echo $0 $@ } prog $@ </pre> @@ -106,7 +106,7 @@ positional parameters that have no meaning to it. A better script is: <pre> #!/command/execlineb elgetpositionals - foreground { echo $0 $@ } + ; { echo $0 $@ } emptyenv -P prog $@ </pre> @@ -162,7 +162,7 @@ at all; for instance, in <li> Use <tt>execlineb -S<em>n</em></tt> if you need only simple positional parameter substitution in your script - no <a href="shift.html">shift</a> or <a href="elgetopt.html">elgetopt</a>, -no <tt>importas 1 1</tt>. </li> +no <tt>$ 1 1</tt>. </li> <li> Use <tt>execlineb -p</tt>, then <tt>elgetpositionals</tt> if you don't mind overwriting the current stack of positional parameters. </li> <li> Use <tt>execlineb</tt>, then <tt>elgetpositionals</tt>, then diff --git a/doc/el_semicolon.html b/doc/el_semicolon.html index 31446fe..b440a52 100644 --- a/doc/el_semicolon.html +++ b/doc/el_semicolon.html @@ -29,14 +29,14 @@ That is precisely what <em>blocks</em> are made for. <p> execline commands that need more than one linear set of arguments use blocks. For instance, the -<a href="foreground.html">foreground</a> command needs to spawn a +<a href="foreground.html">;</a> command needs to spawn a first process, then execute into a second one. It reads the command line for the first process from a block, and the command line for the second process from the rest of the argv. In the following script: </p> <pre> #!/command/execlineb - foreground { echo 1 } echo 2 + ; { echo 1 } echo 2 </pre> <p> <tt>echo 1</tt> is read from a block and spawned; then @@ -68,13 +68,13 @@ spaces. <p> Actually, the block-reading commands know nothing about braces; they only understand the "quoted arguments + empty word" syntax. -So if you want to use <a href="foreground.html">foreground</a> +So if you want to use <a href="foreground.html">;</a> from your shell to sequence <tt>echo 1</tt> and <tt>echo 2</tt>, you will have to write </p> <pre> - $ foreground ' echo' ' 1' '' echo 2 + $ ; ' echo' ' 1' '' echo 2 </pre> <p> @@ -83,7 +83,7 @@ that simple case. The following command works as well: </p> <pre> - $ foreground echo 1 '' echo 2 + $ ; echo 1 '' echo 2 </pre> <p> @@ -94,7 +94,7 @@ produce empty words, which may modify your script's execution flow. </p> <pre> - $ define FOO '' foreground ' echo' ' ${FOO}' ' rm' ' -rf' ' /' '' echo blah + \$ = FOO '' \; ' echo' ' ${FOO}' ' rm' ' -rf' ' /' '' echo blah </pre> <p> @@ -102,7 +102,7 @@ produce empty words, which may modify your script's execution flow. </p> <pre> - $ define FOO '' foreground echo '${FOO}' rm -rf / '' echo blah + \$ = FOO '' \; echo '${FOO}' rm -rf / '' echo blah </pre> <p> diff --git a/doc/el_substitute.html b/doc/el_substitute.html index 6b72321..e10c8a4 100644 --- a/doc/el_substitute.html +++ b/doc/el_substitute.html @@ -35,10 +35,10 @@ real variables, it provides such a <em>substitution</em> facility via <em>substitution commands</em>, namely: </p> <ul> - <li> <a href="define.html">define</a> </li> + <li> <a href="define.html">=</a> </li> <li> <a href="import.html">import</a> </li> - <li> <a href="importas.html">importas</a> </li> - <li> <a href="elglob.html">elglob</a> </li> + <li> <a href="importas.html">$</a> </li> + <li> <a href="elglob.html">*</a> </li> <li> <a href="elgetpositionals.html">elgetpositionals</a> </li> <li> <a href="multidefine.html">multidefine</a> </li> <li> <a href="multisubstitute.html">multisubstitute</a> </li> @@ -69,7 +69,7 @@ The simplest example is the following: <pre> #!/command/execlineb -define FOO blah += FOO blah echo $FOO </pre> @@ -148,9 +148,9 @@ nothing special. <pre> #!/command/execlineb -define A val -foreground { echo $A \\$A \\\\$A \\\\\\$A \\\\\\\\$A \\\\\\\\\\$A } - echo $B \\$B \\\\$B \\\\\\$B \\\\\\\\$B \\\\\\\\\\$B += A val +; { echo $A \\$A \\\\$A \\\\\\$A \\\\\\\\$A \\\\\\\\\\$A } + echo $B \\$B \\\\$B \\\\\\$B \\\\\\\\$B \\\\\\\\\\$B </pre> <p> prints @@ -197,7 +197,7 @@ for <em>A</em>. <br /> <pre> #!/command/execlineb -define -s FOO "v1 v2 v3" echo prefix-${FOO}-postfix += -s FOO "v1 v2 v3" echo prefix-${FOO}-postfix </pre> <p> @@ -228,7 +228,7 @@ right. For instance, in <pre> #!/command/execlineb -define -s B "1 2 3" echo ${B}x${B} += -s B "1 2 3" echo ${B}x${B} </pre> <p> the <tt>${B}x${B}</tt> word will be replaced with <em>nine</em> words: @@ -241,8 +241,8 @@ define -s B "1 2 3" echo ${B}x${B} #!/command/execlineb multisubstitute { - define -s A "a b c d" - define -s B "1 2 3" + = -s A "a b c d" + = -s B "1 2 3" } echo ${A}x${B} </pre> @@ -252,7 +252,7 @@ echo ${A}x${B} <tt>ax1</tt>, <tt>ax2</tt>, <tt>ax3</tt>, <tt>bx1</tt>, <tt>bx2</tt>, <tt>bx3</tt>, <tt>cx1</tt>, <tt>cx2</tt>, <tt>cx3</tt>, <tt>dx1</tt>, <tt>dx2</tt>, and <tt>dx3</tt>, in that order. You can check that the -order of the <tt>define</tt> directives in +order of the <tt>=</tt> directives in <a href="multisubstitute.html">multisubstitute</a> does not matter. </p> @@ -264,8 +264,8 @@ be replaced with <pre> #!/command/execlineb -define -s B "1 2 3" -define -s A "a b c d" += -s B "1 2 3" += -s A "a b c d" echo ${A}x${B} </pre> <p> diff --git a/doc/el_transform.html b/doc/el_transform.html index f33c576..cba6443 100644 --- a/doc/el_transform.html +++ b/doc/el_transform.html @@ -123,7 +123,7 @@ split <tt>$1</tt>, for instance, you have to ask for it specifically: <pre> #!/command/<a href="execlineb.html">execlineb</a> -S1 -<a href="define.html">define</a> -sd" " ARG1S $1 +<a href="define.html">=</a> -sd" " ARG1S $1 blah $ARG1S </pre> and $ARG1S will be split using the space character as only delimiter. @@ -174,7 +174,7 @@ in the following command line: </p> <pre> - $ define -s -d "" A '1:a,2:bb,0:,7:xyz 123,1: ,' echo '$A' + $ = -s -d "" A '1:a,2:bb,0:,7:xyz 123,1: ,' echo '$A' </pre> <p> @@ -195,7 +195,7 @@ substitution command will die with an error message. </p> <p> - The <a href="dollarat.html">dollarat</a> command, for instance, + The <a href="dollarat.html">$@</a> command, for instance, can produce a sequence of netstrings (encoding all the arguments given to an execline script), meant to be decoded by a substitution command with the <tt>-d ""</tt> option. diff --git a/doc/elgetpositionals.html b/doc/elgetpositionals.html index b24febe..ce59b72 100644 --- a/doc/elgetpositionals.html +++ b/doc/elgetpositionals.html @@ -82,7 +82,7 @@ on the positional parameters, think about replacing the <a href="multisubstitute.html">multisubstitute</a> call containing the <tt>elgetpositionals</tt> directive. </li> <li> If you are going to use the <a href="shift.html">shift</a> -command, it is best to use <a href="importas.html">importas</a> to +command, it is best to use <a href="importas.html">$</a> to substitute the first positional parameters, then use <tt>shift</tt>, then <tt>elgetpositionals</tt>. That way, <tt>$@</tt> will correctly be replaced by the remaining arguments. More generally, you should diff --git a/doc/elglob.html b/doc/elglob.html index 80c438d..5d9f89b 100644 --- a/doc/elglob.html +++ b/doc/elglob.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the elglob command</title> - <meta name="Description" content="execline: the elglob command" /> - <meta name="Keywords" content="execline command elglob pattern shell globbing" /> + <title>execline: the * command</title> + <meta name="Description" content="execline: the * command" /> + <meta name="Keywords" content="execline command * pattern shell globbing" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,21 +16,21 @@ <a href="//skarnet.org/">skarnet.org</a> <p /> -<h1> The <tt>elglob</tt> program </h1> +<h1> The <tt>*</tt> program </h1> <p> -<tt>elglob</tt> performs globbing on a pattern, then executes +<tt>*</tt> performs globbing on a pattern, then executes another program. </p> <h2> Interface </h2> <pre> - elglob [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] <em>variable</em> <em>pattern</em> <em>prog...</em> + * [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] <em>variable</em> <em>pattern</em> <em>prog...</em> </pre> <ul> - <li> <tt>elglob</tt> performs + <li> <tt>*</tt> performs <a href="http://pubs.opengroup.org/onlinepubs/9699919799/functions/glob.html">globbing</a> on <em>pattern</em>. </li> <li> It then performs @@ -38,7 +38,7 @@ on <em>pattern</em>. </li> <em>prog...</em>, using <em>variable</em> as key and the result of the globbing as value. The value is always split: it contains as many words as they are matches for the globbing pattern. </li> - <li> <tt>elglob</tt> then execs into the modified <em>prog...</em>. </li> + <li> <tt>*</tt> then execs into the modified <em>prog...</em>. </li> </ul> <h2> Options </h2> @@ -57,7 +57,7 @@ literally; do not allow quoting of metacharacters in <em>pattern</em> via backslashes. <strong>Warning</strong>: the <a href="execlineb.html">execlineb</a> launcher uses the backslash as their own escape character - if you want a -backslash to be passed to <tt>elglob</tt>, do not forget to <em>double</em> +backslash to be passed to <tt>*</tt>, do not forget to <em>double</em> it. </li> <li> <tt>-0</tt> : null globbing. By default, if <em>pattern</em> matches nothing, it will be substituted as is (verbatim in one word). With diff --git a/doc/execlineb.html b/doc/execlineb.html index 9fa4243..70426d7 100644 --- a/doc/execlineb.html +++ b/doc/execlineb.html @@ -178,7 +178,7 @@ the <a href="grammar.html">execline grammar</a>. <p> External execline commands that read blocks, like -<a href="foreground.html">foreground</a>, use the <tt>EXECLINE_STRICT</tt> +<a href="foreground.html">;</a>, use the <tt>EXECLINE_STRICT</tt> environment variable: if it is set to 1, they will print a warning message on stderr if they find their blocks not to be properly quoted. If it is set to 2, they will also die. If it is set to 0, or unset, they won't complain diff --git a/doc/fdclose.html b/doc/fdclose.html index 2101690..b014384 100644 --- a/doc/fdclose.html +++ b/doc/fdclose.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the fdclose program</title> - <meta name="Description" content="execline: the fdclose program" /> - <meta name="Keywords" content="execline command fdclose file descriptor close" /> + <title>execline: the >&- program</title> + <meta name="Description" content="execline: the >&- program" /> + <meta name="Keywords" content="execline command >&- file descriptor close" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,28 +16,28 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>fdclose</tt> program </h1> +<h1> The <tt>>&-</tt> program </h1> <p> -<tt>fdclose</tt> closes a given file descriptor, then +<tt>>&-</tt> closes a given file descriptor, then executes a program. </p> <h2> Interface </h2> <pre> - fdclose <em>fd</em> <em>prog...</em> + >&- <em>fd</em> <em>prog...</em> </pre> <p> -<tt>fdclose</tt> closes the file descriptor number <em>fd</em>, then +<tt>>&-</tt> closes the file descriptor number <em>fd</em>, then execs into <em>prog</em> with its arguments. </p> <h2> Notes </h2> <ul> - <li> <tt>fdclose <em>n</em> prog...</tt> is roughly equivalent to + <li> <tt>>&- <em>n</em> prog...</tt> is roughly equivalent to <tt>sh -c 'exec prog... <em>n</em><&-'</tt></li> </ul> diff --git a/doc/fdmove.html b/doc/fdmove.html index 39bdb2b..f8cf841 100644 --- a/doc/fdmove.html +++ b/doc/fdmove.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the fdmove program</title> - <meta name="Description" content="execline: the fdmove program" /> - <meta name="Keywords" content="execline command fdmove file descriptor dup dup2" /> + <title>execline: the >& program</title> + <meta name="Description" content="execline: the >& program" /> + <meta name="Keywords" content="execline command >& file descriptor dup dup2" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,23 +16,23 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>fdmove</tt> program </h1> +<h1> The <tt>>&</tt> program </h1> <p> -<tt>fdmove</tt> moves or copies a given file descriptor, then +<tt>>&</tt> moves or copies a given file descriptor, then executes a program. </p> <h2> Interface </h2> <pre> - fdmove [ -c ] <em>fdto</em> <em>fdfrom</em> <em>prog...</em> + >& [ -c ] <em>fdto</em> <em>fdfrom</em> <em>prog...</em> </pre> <p> -<tt>fdmove</tt> moves the file descriptor number <em>fdfrom</em>, +<tt>>&</tt> moves the file descriptor number <em>fdfrom</em>, to number <em>fdto</em>, then execs into <em>prog</em> with its arguments. -If <em>fdto</em> is open, <tt>fdmove</tt> closes it before moving +If <em>fdto</em> is open, <tt>>&</tt> closes it before moving <em>fdfrom</em> to it. </p> @@ -46,9 +46,9 @@ instead of moving it; do not close <em>fdfrom</em>. </li> <h2> Notes </h2> <ul> - <li> <tt>fdmove -c <em>a</em> <em>b</em> prog...</tt> is roughly equivalent to + <li> <tt>>& -c <em>a</em> <em>b</em> prog...</tt> is roughly equivalent to <tt>sh -c 'exec prog... <em>a</em>>&<em>b</em>'</tt></li> - <li> <tt>fdmove <em>a</em> <em>b</em> prog...</tt> is roughly equivalent to + <li> <tt>>& <em>a</em> <em>b</em> prog...</tt> is roughly equivalent to <tt>sh -c 'exec prog... <em>a</em>>&<em>b</em> <em>b</em><&-'</tt></li> </ul> diff --git a/doc/fdreserve.html b/doc/fdreserve.html index cc808da..6fd168b 100644 --- a/doc/fdreserve.html +++ b/doc/fdreserve.html @@ -50,8 +50,8 @@ use: fdreserve 2 multisubstitute { - importas fdr FD0 - importas fdw FD1 + $ fdr FD0 + $ fdw FD1 } piperw $fdr $fdw <em>prog...</em> @@ -67,15 +67,15 @@ descriptors that are free at the time it is run. A program like fdreserve 3 multisubstitute { - importas fdr FD0 - importas fdw FD1 + $ fdr FD0 + $ fdw FD1 } piperw $fdr $fdw fdreserve 1 multisubstitute { - importas oldfd FD2 - importas newfd FD0 + $ oldfd FD2 + $ newfd FD0 } <em>prog...</em> </pre> diff --git a/doc/fdswap.html b/doc/fdswap.html index cc055de..0ff845f 100644 --- a/doc/fdswap.html +++ b/doc/fdswap.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the fdswap program</title> - <meta name="Description" content="execline: the fdswap program" /> - <meta name="Keywords" content="execline command fdswap file descriptor dup dup2" /> + <title>execline: the <> program</title> + <meta name="Description" content="execline: the <> program" /> + <meta name="Keywords" content="execline command <> file descriptor dup dup2" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,28 +16,28 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>fdswap</tt> program </h1> +<h1> The <tt><></tt> program </h1> <p> -<tt>fdswap</tt> swaps two file descriptors, then +<tt><></tt> swaps two file descriptors, then executes a program. </p> <h2> Interface </h2> <pre> - fdswap <em>fd1</em> <em>fd2</em> <em>prog...</em> + <> <em>fd1</em> <em>fd2</em> <em>prog...</em> </pre> <p> -<tt>fdswaps</tt> swaps file descriptors numbered <em>fd1</em> and +<tt><></tt> swaps file descriptors numbered <em>fd1</em> and <em>fd2</em>, then execs into <em>prog</em> with its arguments. </p> <h2> Notes </h2> <ul> - <li> fdswap has no portable shell equivalent. </li> + <li> <> has no portable shell equivalent. </li> </ul> </body> diff --git a/doc/forbacktickx.html b/doc/forbacktickx.html index e116be6..5a9dc3e 100644 --- a/doc/forbacktickx.html +++ b/doc/forbacktickx.html @@ -79,9 +79,9 @@ split <em>x</em>. </li> <li> You can start <em>loop...</em> with "import -u <em>variable</em>" to perform variable substitution. </li> <li> forbacktickx is now implemented as a wrapper around the -<a href="pipeline.html">pipeline</a> and +<a href="pipeline.html">|</a> and <a href="forstdin.html">forstdin</a> commands, with calls to -<a href="fdmove.html">fdmove</a> to ensure that <em>loop...</em> is called +<a href="fdmove.html">>&</a> to ensure that <em>loop...</em> is called with the proper standard input. </li> </ul> diff --git a/doc/foreground.html b/doc/foreground.html index c9c0703..b7cf906 100644 --- a/doc/foreground.html +++ b/doc/foreground.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the foreground command</title> - <meta name="Description" content="execline: the foreground command" /> - <meta name="Keywords" content="execline command foreground" /> + <title>execline: the ; command</title> + <meta name="Description" content="execline: the ; command" /> + <meta name="Keywords" content="execline command ;" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,10 +16,10 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>foreground</tt> program </h1> +<h1> The <tt>;</tt> program </h1> <p> -<tt>foreground</tt> executes a sequence of commands. +<tt>;/tt> executes a sequence of commands. </p> <h2> Interface </h2> @@ -29,35 +29,35 @@ </p> <pre> - foreground { <em>prog1...</em> } <em>prog2...</em> + ; { <em>prog1...</em> } <em>prog2...</em> </pre> <ul> - <li> <tt>foreground</tt> reads <em>prog1</em> in a + <li> <tt>;</tt> reads <em>prog1</em> in a <a href="el_semicolon.html">block</a>. It forks and executes it, then waits for it to complete. </li> - <li> <tt>foreground</tt> sets the <tt>?</tt> environment + <li> <tt>;</tt> sets the <tt>?</tt> environment variable to the exit code of <em>prog1</em>. If <em>prog1...</em> was killed by a signal, the <tt>?</tt> value is 256 plus the signal number. </li> - <li> <tt>foreground</tt> then execs into <em>prog2...</em>. </li> + <li> <tt>;</tt> then execs into <em>prog2...</em>. </li> </ul> <h2> Notes </h2> <ul> - <li> <tt>foreground</tt> is the basic sequence operator: it takes two + <li> <tt>;</tt> is the basic sequence operator: it takes two commands and executes them one by one. execline scripts require it to wrap external commands that exit instead of natively supporting the "perform some action, then execute some other program" model. </li> - <li> <tt>foreground <em>prog1...</em> "" <em>prog2...</em></tt> is + <li> <tt>; <em>prog1...</em> "" <em>prog2...</em></tt> is equivalent to <tt>sh -c '<em>prog1...</em> ; exec <em>prog2...</em>'</tt>. </li> <li> 256 and above are not valid exit codes for commands, so when the <tt>?</tt> environment variable contains 256 or more, it means that the previous command was killed by a signal. There is no ambiguity here, and <tt>?</tt> reports exactly what happened to the previous command; -<tt>foreground</tt> does not exit, so there is no need for +<tt>;</tt> does not exit, so there is no need for <a href="exitcodes.html">exit code approximation</a>. </li> </ul> diff --git a/doc/forstdin.html b/doc/forstdin.html index 5228aee..ff01dc4 100644 --- a/doc/forstdin.html +++ b/doc/forstdin.html @@ -71,7 +71,7 @@ split <em>x</em>. </li> <h2> Notes </h2> <ul> - <li> You can start <em>loop...</em> with "importas -u <em>variable</em> <em>variable</em>" + <li> You can start <em>loop...</em> with "$ -u <em>variable</em> <em>variable</em>" to perform variable substitution. </li> </ul> diff --git a/doc/forx.html b/doc/forx.html index 1c2a61c..b3461aa 100644 --- a/doc/forx.html +++ b/doc/forx.html @@ -68,7 +68,7 @@ listed in the <em>breakcodes</em> list, else it will exit 1. </li> <h2> Notes </h2> <ul> - <li> You can start <em>loop</em> with "importas -u <em>variable</em> <em>variable</em>" + <li> You can start <em>loop</em> with "$ -u <em>variable</em> <em>variable</em>" if you want variable substitution. </li> </ul> diff --git a/doc/getpid.html b/doc/getpid.html index ca363df..8bcb463 100644 --- a/doc/getpid.html +++ b/doc/getpid.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the getpid program</title> - <meta name="Description" content="execline: the getpid program" /> - <meta name="Keywords" content="execline command getpid process id variable" /> + <title>execline: the ! program</title> + <meta name="Description" content="execline: the ! program" /> + <meta name="Keywords" content="execline command ! process id variable" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,21 +16,21 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>getpid</tt> program </h1> +<h1> The <tt>!</tt> program </h1> <p> -<tt>getpid</tt> stores its process ID in a given environment variable, +<tt>!</tt> stores its process ID in a given environment variable, then executes a program. </p> <h2> Interface </h2> <pre> - getpid <em>var</em> <em>prog...</em> + ! <em>var</em> <em>prog...</em> </pre> <p> -<tt>getpid</tt> stores its PID in the <em>var</em> variable, then +<tt>!</tt> stores its PID in the <em>var</em> variable, then execs into <em>prog</em> with its arguments. </p> diff --git a/doc/grammar.html b/doc/grammar.html index dd2ea62..ddc746e 100644 --- a/doc/grammar.html +++ b/doc/grammar.html @@ -133,12 +133,12 @@ arguments, the <em>arglist</em>, then executes into a (possibly empty) <em>instruction</em>. </li> <li> Some <em>builtin</em>s are special because they also take a non-empty <em>blocklist</em> after their <em>arglist</em>. For instance, -the <a href="foreground.html">foreground</a> command takes an empty +the <a href="foreground.html">;</a> command takes an empty <em>arglist</em> and one <em>block</em>: <pre> #!/command/execlineb -P - foreground { sleep 1 } echo blah + ; { sleep 1 } echo blah </pre> is a valid <a href="execlineb.html">execlineb</a> script. -The <a href="foreground.html">foreground</a> command uses the +The <a href="foreground.html">;</a> command uses the <tt>sleep 1</tt> <em>block</em> then execs into the remaining <tt>echo blah</tt> <em>instruction</em>. </li> </ul> diff --git a/doc/heredoc.html b/doc/heredoc.html index dd68a3f..002ffaa 100644 --- a/doc/heredoc.html +++ b/doc/heredoc.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the heredoc program</title> - <meta name="Description" content="execline: the heredoc program" /> - <meta name="Keywords" content="execline command heredoc here document" /> + <title>execline: the << program</title> + <meta name="Description" content="execline: the << program" /> + <meta name="Keywords" content="execline command << here document" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,21 +16,21 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>heredoc</tt> program </h1> +<h1> The <tt><<</tt> program </h1> <p> -<tt>heredoc</tt> runs a command with a certain string fed to a +<tt><<</tt> runs a command with a certain string fed to a file descriptor. </p> <h2> Interface </h2> <pre> - heredoc [ -d ] <em>fd</em> <em>string</em> <em>prog...</em> + << [ -d ] <em>fd</em> <em>string</em> <em>prog...</em> </pre> <ul> - <li> <tt>heredoc</tt> execs into <em>prog...</em> with + <li> <tt><<</tt> execs into <em>prog...</em> with <em>string</em> available on the <em>fd</em> file descriptor. </li> <li> <em>string</em> must not contain a null character. </li> @@ -40,7 +40,7 @@ descriptor. </li> <ul> <li> <tt>-d</tt> : run the process feeding <em>string</em> to <em>fd</em> -as a grandchild of <tt>heredoc</tt>. This is meant to prevent a zombie +as a grandchild of <tt><<</tt>. This is meant to prevent a zombie from hanging around if <em>prog...</em> has read <em>string</em> and fails to wait for its children.</li> </ul> @@ -48,7 +48,7 @@ to wait for its children.</li> <h2> Notes </h2> <ul> - <li> <tt>heredoc</tt> is meant to be used in place of the shell + <li> <tt><<</tt> is meant to be used in place of the shell <tt><<</tt> construct, which includes <em>here-documents</em> into scripts. </li> </ul> diff --git a/doc/homeof.html b/doc/homeof.html index ca9da93..d84110f 100644 --- a/doc/homeof.html +++ b/doc/homeof.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the homeof program</title> - <meta name="Description" content="execline: the homeof program" /> - <meta name="Keywords" content="execline command homeof" /> + <title>execline: the ~ program</title> + <meta name="Description" content="execline: the ~ program" /> + <meta name="Keywords" content="execline command ~" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,20 +16,20 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>homeof</tt> program </h1> +<h1> The <tt>~</tt> program </h1> <p> -<tt>homeof</tt> prints the home directory of a user. +<tt>~</tt> prints the home directory of a user. </p> <h2> Interface </h2> <pre> - homeof <em>user</em> + ~ <em>user</em> </pre> <p> -<tt>homeof</tt> finds the name of <em>user</em>'s home directory, writes +<tt>~</tt> finds the name of <em>user</em>'s home directory, writes it on stdout, then exits 0. If an error occurs, it prints nothing on stdout but exits 111 with an explanatory message on stderr. </p> diff --git a/doc/if.html b/doc/if.html index 700ee59..09f944a 100644 --- a/doc/if.html +++ b/doc/if.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the if command</title> - <meta name="Description" content="execline: the if command" /> - <meta name="Keywords" content="execline command if" /> + <title>execline: the && command</title> + <meta name="Description" content="execline: the && command" /> + <meta name="Keywords" content="execline command &&" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,10 +16,10 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>if</tt> program </h1> +<h1> The <tt>&&</tt> program </h1> <p> -<tt>if</tt> performs conditional execution. +<tt>&&</tt> performs conditional execution. </p> <h2> Interface </h2> @@ -29,18 +29,18 @@ </p> <pre> - if [ -X ] [ -n ] [ -t | -x <em>exitcode</em> ] { <em>prog1...</em> } <em>prog2...</em> + && [ -X ] [ -n ] [ -t | -x <em>exitcode</em> ] { <em>prog1...</em> } <em>prog2...</em> </pre> <ul> - <li> <tt>if</tt> reads <em>prog1...</em> in a + <li> <tt>&&</tt> reads <em>prog1...</em> in a <a href="el_semicolon.html">block</a>. It forks and executes it, then waits for it to complete. </li> - <li> If <em>prog1</em> crashes, <tt>if</tt> prints an error message + <li> If <em>prog1</em> crashes, <tt>&&</tt> prints an error message then exits 128 plus the number of the signal that killed <em>prog1</em>. </li> <li> If <em>prog1</em> exits a non-zero status, -<tt>if</tt> exits 1.</li> - <li> Else <tt>if</tt> execs into <em>prog2</em>. </li> +<tt>&&</tt> exits 1.</li> + <li> Else <tt>&&</tt> execs into <em>prog2</em>. </li> </ul> <h2> Options </h2> @@ -56,12 +56,12 @@ This is equivalent to <tt>-x 0</tt>. </li> <h2> Notes </h2> <ul> - <li> <tt>if</tt> will exit if <em>prog1...</em> exits false. To use it in + <li> <tt>&&</tt> will exit if <em>prog1...</em> exits false. To use it in an execline script that must run <em>prog3...</em> no matter the result of -the test, use a <tt>foreground</tt> wrapper: -<pre> foreground { if { <em>prog1...</em> } <em>prog2...</em> } <em>prog3...</em> </pre> +the test, use a <tt>;</tt> wrapper: +<pre> ; { && { <em>prog1...</em> } <em>prog2...</em> } <em>prog3...</em> </pre> (in <a href="execlineb.html">execlineb</a> syntax) </li> - <li> <tt>if <em>prog1...</em> "" <em>prog2...</em></tt> is + <li> <tt>&& <em>prog1...</em> "" <em>prog2...</em></tt> is equivalent to <tt>sh -c '<em>prog1...</em> && exec <em>prog2...</em>'</tt>. </li> </ul> diff --git a/doc/ifte.html b/doc/ifte.html index 56fb55e..dbfe5ef 100644 --- a/doc/ifte.html +++ b/doc/ifte.html @@ -62,7 +62,7 @@ It performs <em>only</em> conditional execution, not instruction sequence. <p> "<tt>ifthenelse { progif } { progthen } { progelse } remainder</tt>" is the -equivalent of "<tt>foreground { ifte { progthen } { progelse } progif } remainder</tt>". +equivalent of "<tt>; { ifte { progthen } { progelse } progif } remainder</tt>". </p> </body> diff --git a/doc/import.html b/doc/import.html index 8efcdd1..10dbffb 100644 --- a/doc/import.html +++ b/doc/import.html @@ -31,7 +31,7 @@ then executes another program. <ul> <li> <tt>import</tt> behaves exactly as -<tt><a href="importas.html">importas</a> <em>envvar</em> <em>envvar</em></t>. +<tt><a href="importas.html">$</a> <em>envvar</em> <em>envvar</em></t>. </ul> <h2> Notes </h2> @@ -39,7 +39,7 @@ then executes another program. <ul> <li> Starting in execline-2.5.0.0, the <tt>import</tt> command is marked as obsolescent; it will disappear in a future version of execline. -It is recommended to use the <a href="importas.html">importas</a> +It is recommended to use the <a href="importas.html">$</a> command instead. </li> </ul> diff --git a/doc/importas.html b/doc/importas.html index 0bd8246..280f527 100644 --- a/doc/importas.html +++ b/doc/importas.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the importas program</title> - <meta name="Description" content="execline: the importas program" /> - <meta name="Keywords" content="execline command importas import environment variable" /> + <title>execline: the $ program</title> + <meta name="Description" content="execline: the $ program" /> + <meta name="Keywords" content="execline command $ import environment variable" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,28 +16,28 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>importas</tt> program </h1> +<h1> The <tt>$</tt> program </h1> <p> -<tt>importas</tt> replaces a literal with the value of an +<tt>$</tt> replaces a literal with the value of an environment variable, then executes another program. </p> <h2> Interface </h2> <pre> - importas [ -i | -D default ] [ -u ] [ -s ] [ -C | -c ] [ -n ] [ -d <em>delim</em> ] <em>variable</em> <em>envvar</em> <em>prog...</em> + $ [ -i | -D default ] [ -u ] [ -s ] [ -C | -c ] [ -n ] [ -d <em>delim</em> ] <em>variable</em> <em>envvar</em> <em>prog...</em> </pre> <ul> - <li> <tt>importas</tt> fetches the value of <em>envvar</em> in the + <li> <tt>$</tt> fetches the value of <em>envvar</em> in the environment. If neither the <em>-D</em> nor the <em>-i</em> option is given, and <em>envvar</em> is undefined, <strong>no word</strong> is returned (that is different from the empty word). </li> - <li> <tt>importas</tt> then performs + <li> <tt>$</tt> then performs <a href="el_substitute.html">variable substitution</a> on <em>prog...</em>, with <em>variable</em> as key and that string as value. - <li><tt>importas</tt> then execs into the modified <em>prog...</em>. </li> + <li><tt>$</tt> then execs into the modified <em>prog...</em>. </li> </ul> <h2> Options </h2> @@ -48,11 +48,11 @@ with <em>variable</em> as key and that string as value. <em>variable</em> instead of no word. For instance, to substitute the empty word, use <tt>-D ""</tt>. </li> <li> <tt>-i</tt> : Insist. If <em>envvar</em> is undefined, -<tt>importas</tt> will not do anything; instead, it will exit 100 with an +<tt>$</tt> will not do anything; instead, it will exit 100 with an error message. This has precedence over any <tt>-D</tt> option. </li> <li> <tt>-u</tt> : Unexport. <em>envvar</em> will be removed from -the environment after the substitution. <tt>importas -u <em>variable</em> -<em>envvar</em></tt> is equivalent to <tt>importas <em>variable</em> +the environment after the substitution. <tt>$ -u <em>variable</em> +<em>envvar</em></tt> is equivalent to <tt>$ <em>variable</em> <em>envvar</em> unexport <em>envvar</em></tt>. </li> <li> Other options are used to <a href="el_transform.html">control the substitution mechanism</a>. </li> diff --git a/doc/index.html b/doc/index.html index aabda00..dccdecf 100644 --- a/doc/index.html +++ b/doc/index.html @@ -130,17 +130,17 @@ to your installation: the shebang lines for your system might be something like <li><a href="emptyenv.html">The <tt>emptyenv</tt> program</a></li> <li><a href="export.html">The <tt>export</tt> program</a></li> <li><a href="unexport.html">The <tt>unexport</tt> program</a></li> -<li><a href="fdclose.html">The <tt>fdclose</tt> program</a></li> +<li><a href="fdclose.html">The <tt>>&-</tt> program</a></li> <li><a href="fdblock.html">The <tt>fdblock</tt> program</a></li> -<li><a href="fdmove.html">The <tt>fdmove</tt> program</a></li> -<li><a href="fdswap.html">The <tt>fdswap</tt> program</a></li> +<li><a href="fdmove.html">The <tt>>&</tt> program</a></li> +<li><a href="fdswap.html">The <tt><></tt> program</a></li> <li><a href="fdreserve.html">The <tt>fdreserve</tt> program</a></li> -<li><a href="redirfd.html">The <tt>redirfd</tt> program</a></li> +<li><a href="redirfd.html">The <tt><</tt> program</a></li> <li><a href="piperw.html">The <tt>piperw</tt> program</a></li> -<li><a href="heredoc.html">The <tt>heredoc</tt> program</a></li> +<li><a href="heredoc.html">The <tt><<</tt> program</a></li> <li><a href="wait.html">The <tt>wait</tt> program</a></li> <li><a href="getcwd.html">The <tt>getcwd</tt> program</a></li> -<li><a href="getpid.html">The <tt>getpid</tt> program</a></li> +<li><a href="getpid.html">The <tt>!</tt> program</a></li> <li><a href="exec.html">The <tt>exec</tt> program</a></li> <li><a href="tryexec.html">The <tt>tryexec</tt> program</a></li> <li><a href="exit.html">The <tt>exit</tt> program</a></li> @@ -151,24 +151,24 @@ to your installation: the shebang lines for your system might be something like (<a href="el_semicolon.html">Basic block management</a>) </p> <ul> -<li><a href="foreground.html">The <tt>foreground</tt> program</a></li> -<li><a href="background.html">The <tt>background</tt> program</a></li> -<li><a href="if.html">The <tt>if</tt> program</a></li> +<li><a href="foreground.html">The <tt>;</tt> program</a></li> +<li><a href="background.html">The <tt>&</tt> program</a></li> +<li><a href="if.html">The <tt>&&</tt> program</a></li> <li><a href="ifelse.html">The <tt>ifelse</tt> program</a></li> <li><a href="ifte.html">The <tt>ifte</tt> program</a></li> <li><a href="ifthenelse.html">The <tt>ifthenelse</tt> program</a></li> -<li><a href="backtick.html">The <tt>backtick</tt> program</a></li> -<li><a href="pipeline.html">The <tt>pipeline</tt> program</a></li> +<li><a href="backtick.html">The <tt>`</tt> program</a></li> +<li><a href="pipeline.html">The <tt>|</tt> program</a></li> <li><a href="runblock.html">The <tt>runblock</tt> program</a></li> </ul> <p> (<a href="el_substitute.html">Variable management</a>) </p> <ul> -<li><a href="define.html">The <tt>define</tt> program</a></li> -<li><a href="importas.html">The <tt>importas</tt> program</a></li> +<li><a href="define.html">The <tt>=</tt> program</a></li> +<li><a href="importas.html">The <tt>$</tt> program</a></li> <li><a href="import.html">The <tt>import</tt> program</a></li> -<li><a href="elglob.html">The <tt>elglob</tt> program</a></li> +<li><a href="elglob.html">The <tt>*</tt> program</a></li> <li><a href="elgetpositionals.html">The <tt>elgetpositionals</tt> program</a></li> <li><a href="multidefine.html">The <tt>multidefine</tt> program</a></li> <li><a href="multisubstitute.html">The <tt>multisubstitute</tt> program</a></li> @@ -188,13 +188,13 @@ to your installation: the shebang lines for your system might be something like <ul> <li><a href="elgetopt.html">The <tt>elgetopt</tt> program</a></li> <li><a href="shift.html">The <tt>shift</tt> program</a></li> -<li><a href="dollarat.html">The <tt>dollarat</tt> program</a></li> +<li><a href="dollarat.html">The <tt>$@</tt> program</a></li> </ul> <p> (Miscellaneous) </p> <ul> -<li><a href="homeof.html">The <tt>homeof</tt> program</a></li> +<li><a href="homeof.html">The <tt>~</tt> program</a></li> </ul> <h3> Provided scripts: example <tt>.profile</tt> replacement </h3> @@ -207,10 +207,7 @@ to your installation: the shebang lines for your system might be something like <h3> Fun stuff </h3> <ul> -<li>An execline <a href="quine-jriou.txt">quine</a>. This was quinely provided by -<a href="http://jriou.org/">Joël Riou</a>. The only -external command used is <tt>echo</tt>. </li> -<li> Another <a href="quine-prj.txt">quine</a>, provided by +<li> A <a href="quine-prj.txt">quine</a>, provided by <a href="http://code.dogmap.org/">Paul Jarc</a>. It is much shorter, but uses the external commands <tt>echo</tt> and <tt>env</tt>. Later, Paul rewrote it <a href="quine-prj-2.txt">using only <tt>echo</tt></a>, then diff --git a/doc/multisubstitute.html b/doc/multisubstitute.html index ecfff9b..be3d455 100644 --- a/doc/multisubstitute.html +++ b/doc/multisubstitute.html @@ -32,10 +32,10 @@ its <em>argv</em>, then executes another program. <pre> multisubstitute { - [ <a href="define.html">define</a> [ -n ] [ -s ] [ -C | -c ] [ -d <em>delim</em> ] <em>variable</em> <em>value</em> ] - [ <a href="importas.html">importas</a> [ -i | -D <em>default</em> ] [ -n ] [ -s ] [ -C | -c ] [ -d <em>delim</em> ] <em>variable</em> <em>envvar</em> ] + [ <a href="define.html">=</a> [ -n ] [ -s ] [ -C | -c ] [ -d <em>delim</em> ] <em>variable</em> <em>value</em> ] + [ <a href="importas.html">$</a> [ -i | -D <em>default</em> ] [ -n ] [ -s ] [ -C | -c ] [ -d <em>delim</em> ] <em>variable</em> <em>envvar</em> ] [ <a href="import.html">import</a> [ -i | -D <em>default</em> ] [ -n ] [ -s ] [ -C | -c ] [ -d <em>delim</em> ] <em>envvar</em> ] - [ <a href="elglob.html">elglob</a> [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] <em>variable</em> <em>pattern</em> ] + [ <a href="elglob.html">*</a> [ -v ] [ -w ] [ -s ] [ -m ] [ -e ] [ -0 ] <em>variable</em> <em>pattern</em> ] [ <a href="elgetpositionals.html">elgetpositionals</a> [ -P <em>sharp</em> ] ] [ <a href="multidefine.html">multidefine</a> <em>value</em> { <em>variable...</em> } ] <em>...</em> @@ -55,7 +55,7 @@ to learn about the syntax of each substitution command. </li> <h2> Options </h2> <ul> - <li> If an <tt>import</tt> or <tt>importas</tt> directive was given with the + <li> If an <tt>import</tt> or <tt>$</tt> directive was given with the <tt>-i</tt> option, and the looked up variable is undefined, <tt>multisubstitute</tt> will exit 100. </li> </ul> @@ -72,8 +72,8 @@ to learn about the syntax of each substitution command. </li> <pre> #!/command/execlineb export A wrong - define B ${A} - import A + = B ${A} + $ A A echo ${B} </pre> @@ -87,8 +87,8 @@ to learn about the syntax of each substitution command. </li> export A wrong multisubstitute { - define B ${A} - import A + = B ${A} + $ A A } echo ${B} </pre> diff --git a/doc/pipeline.html b/doc/pipeline.html index 99a89e0..13882f1 100644 --- a/doc/pipeline.html +++ b/doc/pipeline.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the pipeline command</title> - <meta name="Description" content="execline: the pipeline command" /> - <meta name="Keywords" content="execline command pipeline" /> + <title>execline: the | command</title> + <meta name="Description" content="execline: the | command" /> + <meta name="Keywords" content="execline command |" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,10 +16,10 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>pipeline</tt> program </h1> +<h1> The <tt>|</tt> program </h1> <p> -<tt>pipeline</tt> runs two commands with a pipe between them. +<tt>|</tt> runs two commands with a pipe between them. </p> <h2> Interface </h2> @@ -29,11 +29,11 @@ </p> <pre> - pipeline [ -d ] [ -r | -w ] { <em>prog1...</em> } <em>prog2...</em> + | [ -d ] [ -r | -w ] { <em>prog1...</em> } <em>prog2...</em> </pre> <ul> - <li> <tt>pipeline</tt> reads <em>prog1...</em> in a + <li> <tt>|</tt> reads <em>prog1...</em> in a <a href="el_semicolon.html">block</a> and unquotes it. </li> <li> It runs <em>prog1...</em> as a child process and execs into <em>prog2...</em>, with a pipe between <em>prog1</em>'s stdout and @@ -46,7 +46,7 @@ environment variable. </li> <ul> <li> <tt>-d</tt> : run <em>prog1...</em> -as a grandchild of <tt>pipeline</tt>. This is meant to prevent a zombie +as a grandchild of <tt>|</tt>. This is meant to prevent a zombie from hanging around if <em>prog2...</em> fails to wait for its children.</li> <li> <tt>-r</tt> : make <em>prog1...</em> the writer and <em>prog2...</em> the reader. This is the default. </li> @@ -57,7 +57,7 @@ from hanging around if <em>prog2...</em> fails to wait for its children.</li> <h2> Notes </h2> <ul> - <li> You can easily create a chain of pipes: <tt>pipeline a "" pipeline b "" c</tt> + <li> You can easily create a chain of pipes: <tt>| a "" | b "" c</tt> is roughly equivalent to <tt>sh -c 'exec a | b | c'</tt>, except that shells usually run <tt>c</tt> as a child process like <tt>a</tt> and <tt>b</tt>, and <tt>exec</tt> has no diff --git a/doc/quine-dam.txt b/doc/quine-dam.txt index c69a52c..219a594 100644 --- a/doc/quine-dam.txt +++ b/doc/quine-dam.txt @@ -3,7 +3,7 @@ # See comments below. # (Search for "HERE".) # -define -sCd "\n" lns " += -sCd "\n" lns " ${p} ${bubble} is the end of the quine's data. ${p} They represent the following code, with various quotations: ${p} ${b} (backslash) is represented as ${d}${ob}b${cb} @@ -19,38 +19,38 @@ ${p} ${p} Now we have the quine's code! ${p} ${p} First, print the lines that come before the data. -foreground ${ob} printf %s ${b}${p}${b}!${q} ${q} ${cb} -foreground ${ob} printf %s${b}${b}n ${q}/command/execlineb -P${q} ${cb} -foreground ${ob} printf %s${b}${b}n ${b}${p}${q} Public Domain.${q} ${cb} -foreground ${ob} printf %s${b}${b}n ${b}${p}${q} See comments below.${q} ${cb} -foreground ${ob} printf %s ${b}${p}${q} (Search for ${q} ${cb} -foreground ${ob} printf %s${b}${b}n ${b}${q}${bubble}${b}${q}.) ${cb} -foreground ${ob} printf %s${b}${b}n ${b}${p} ${cb} -foreground ${ob} printf %s ${q}define -sCd ${b}${q}${b}${b}n${b}${q} lns ${b}${q}${q} ${cb} +; ${ob} printf %s ${b}${p}${b}!${q} ${q} ${cb} +; ${ob} printf %s${b}${b}n ${q}/command/execlineb -P${q} ${cb} +; ${ob} printf %s${b}${b}n ${b}${p}${q} Public Domain.${q} ${cb} +; ${ob} printf %s${b}${b}n ${b}${p}${q} See comments below.${q} ${cb} +; ${ob} printf %s ${b}${p}${q} (Search for ${q} ${cb} +; ${ob} printf %s${b}${b}n ${b}${q}${bubble}${b}${q}.) ${cb} +; ${ob} printf %s${b}${b}n ${b}${p} ${cb} +; ${ob} printf %s ${q}define -sCd ${b}${q}${b}${b}n${b}${q} lns ${b}${q}${q} ${cb} ${p} Next, print the data themselves, as data. for lin ${ob} ${d}${ob}lns${cb} ${cb} ${ob} multisubstitute ${ob} -define b ${d}${ob}b${cb} -define q ${d}${ob}q${cb} -define p ${d}${ob}p${cb} -define ob ${d}${ob}ob${cb} -define cb ${d}${ob}cb${cb} -define d ${d}${ob}d${cb} -define bubble ${d}${ob}bubble${cb} -define intron ${d}${ob}intron${cb} += b ${d}${ob}b${cb} += q ${d}${ob}q${cb} += p ${d}${ob}p${cb} += ob ${d}${ob}ob${cb} += cb ${d}${ob}cb${cb} += d ${d}${ob}d${cb} += bubble ${d}${ob}bubble${cb} += intron ${d}${ob}intron${cb} ${cb} printf ${b}${b}n%s ${d}${ob}lin${cb} ${cb} -foreground ${ob} printf %s${b}${b}n ${b}${q} ${cb} +; ${ob} printf %s${b}${b}n ${b}${q} ${cb} ${p} Finally, use the data to print the code! for lin ${ob} ${d}${ob}lns${cb} ${cb} ${ob} multisubstitute ${ob} -define b ${b}${b} -define q ${b}${q} -define p ${b}${p} -define ob ${b}${ob} -define cb ${b}${cb} -define d ${d} -define bubble ${bubble} -define intron ${q}${intron}${q} += b ${b}${b} += q ${b}${q} += p ${b}${p} += ob ${b}${ob} += cb ${b}${cb} += d ${d} += bubble ${bubble} += intron ${q}${intron}${q} ${cb} printf %s${b}${b}n ${d}${ob}lin${cb} ${cb} ${p} That's all, folks! - Well, that wasn't so hard, was it? ${p} (This quine was written by <david.madore@ens.fr> - see @@ -71,38 +71,38 @@ ${p} for more information on quines and how to write them.)" # Now we have the quine's code! # # First, print the lines that come before the data. -foreground { printf %s \#\!" " } -foreground { printf %s\\n "/command/execlineb -P" } -foreground { printf %s\\n \#" Public Domain." } -foreground { printf %s\\n \#" See comments below." } -foreground { printf %s \#" (Search for " } -foreground { printf %s\\n \"HERE\".) } -foreground { printf %s\\n \# } -foreground { printf %s "define -sCd \"\\n\" lns \"" } +; { printf %s \#\!" " } +; { printf %s\\n "/command/execlineb -P" } +; { printf %s\\n \#" Public Domain." } +; { printf %s\\n \#" See comments below." } +; { printf %s \#" (Search for " } +; { printf %s\\n \"HERE\".) } +; { printf %s\\n \# } +; { printf %s "= -sCd \"\\n\" lns \"" } # Next, print the data themselves, as data. for lin { ${lns} } { multisubstitute { -define b ${b} -define q ${q} -define p ${p} -define ob ${ob} -define cb ${cb} -define d ${d} -define bubble ${bubble} -define intron ${intron} += b ${b} += q ${q} += p ${p} += ob ${ob} += cb ${cb} += d ${d} += bubble ${bubble} += intron ${intron} } printf \\n%s ${lin} } -foreground { printf %s\\n \" } +; { printf %s\\n \" } # Finally, use the data to print the code! for lin { ${lns} } { multisubstitute { -define b \\ -define q \" -define p \# -define ob \{ -define cb \} -define d $ -define bubble HERE -define intron "NOTICE HOW THIS SENTENCE APPEARS ONLY ONCE IN THIS QUINE?" += b \\ += q \" += p \# += ob \{ += cb \} += d $ += bubble HERE += intron "NOTICE HOW THIS SENTENCE APPEARS ONLY ONCE IN THIS QUINE?" } printf %s\\n ${lin} } # That's all, folks! - Well, that wasn't so hard, was it? # (This quine was written by <david.madore@ens.fr> - see diff --git a/doc/quine-jriou.txt b/doc/quine-jriou.txt deleted file mode 100644 index f8e5455..0000000 --- a/doc/quine-jriou.txt +++ /dev/null @@ -1,28 +0,0 @@ -#!/command/execlineb -define A "#!/command/execlineb" -define B "fine G $ foreground { echo ${C} } -echo -n foreground ${D} define C ${E}${C}${R}foreground -${D} echo ${G}${D}A${H} ${H}${R}foreground -${D} echo define A ${G}${D}C${H}${G}${D}A${H}${G}${D}C${H} ${H}${R}echo --n define B ${G}${D}C${H} ${H}${R}foreground -${D} echo -n ${G}${D}B${H} ${H}${R}foreground -${D} multisubstitute ${D} define C ${E}${C} define D ${E}${D}${R}define -E ${E}${E}${R}define -H ${E}${H} define R ${C}${R}${C} ${H} de } echo ${B}" -foreground { define C \" -foreground { echo ${A} } -foreground { echo define A ${C}${A}${C} } -echo -n define B ${C} } -foreground { echo -n ${B} } -foreground { multisubstitute { define C \" define D \{ -define E \\ -define H \} define R " -" } define G $ foreground { echo ${C} } -echo -n foreground ${D} define C ${E}${C}${R}foreground -${D} echo ${G}${D}A${H} ${H}${R}foreground -${D} echo define A ${G}${D}C${H}${G}${D}A${H}${G}${D}C${H} ${H}${R}echo --n define B ${G}${D}C${H} ${H}${R}foreground -${D} echo -n ${G}${D}B${H} ${H}${R}foreground -${D} multisubstitute ${D} define C ${E}${C} define D ${E}${D}${R}define -E ${E}${E}${R}define -H ${E}${H} define R ${C}${R}${C} ${H} de } echo ${B} diff --git a/doc/quine-prj-2.txt b/doc/quine-prj-2.txt index 9c60b92..1c6c6a1 100644 --- a/doc/quine-prj-2.txt +++ b/doc/quine-prj-2.txt @@ -1,15 +1,15 @@ #!/command/execlineb -define e "#!/command/execlineb -define e ${q}${E}${q} += e "#!/command/execlineb += e ${q}${E}${q} multisubstitute { -define q ${b}${q} -define b ${b}${b} -define E $e += q ${b}${q} += b ${b}${b} += E $e } echo $e" multisubstitute { -define q \" -define b \\ -define E $e += q \" += b \\ += E $e } echo $e diff --git a/doc/quine-prj-3.txt b/doc/quine-prj-3.txt index e5b5708..36e8aa3 100644 --- a/doc/quine-prj-3.txt +++ b/doc/quine-prj-3.txt @@ -1,13 +1,13 @@ #!/command/execlineb -P -define e "#!/command/execlineb -P -define e ${q}${E}${q} += e "#!/command/execlineb -P += e ${q}${E}${q} export E $e -define q ${b}${q} -define b ${b}${b} -import E += q ${b}${q} += b ${b}${b} +$ E E echo $e" export E $e -define q \" -define b \\ -import E += q \" += b \\ +$ E E echo $e diff --git a/doc/quine-prj.txt b/doc/quine-prj.txt index 8d2643f..e567d07 100644 --- a/doc/quine-prj.txt +++ b/doc/quine-prj.txt @@ -1,13 +1,13 @@ #!/command/execlineb -define e "#!/command/execlineb -define e $q${E}${q} += e "#!/command/execlineb += e $q${E}${q} env e=$e -define q ${b}${q} -define b ${b}${b} -importas E e += q ${b}${q} += b ${b}${b} +$ E e echo $e" env e=$e -define q \" -define b \\ -importas E e += q \" += b \\ +$ E e echo $e diff --git a/doc/redirfd.html b/doc/redirfd.html index 94135a9..a8efdd8 100644 --- a/doc/redirfd.html +++ b/doc/redirfd.html @@ -3,9 +3,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Language" content="en" /> - <title>execline: the redirfd command</title> - <meta name="Description" content="execline: the redirfd command" /> - <meta name="Keywords" content="execline command redirfd" /> + <title>execline: the < command</title> + <meta name="Description" content="execline: the < command" /> + <meta name="Keywords" content="execline command <" /> <!-- <link rel="stylesheet" type="text/css" href="//skarnet.org/default.css" /> --> </head> <body> @@ -16,21 +16,21 @@ <a href="//skarnet.org/">skarnet.org</a> </p> -<h1> The <tt>redirfd</tt> program </h1> +<h1> The <tt><</tt> program </h1> <p> -<tt>redirfd</tt> redirects a given file descriptor to a file, then +<tt><</tt> redirects a given file descriptor to a file, then executes a program. </p> <h2> Interface </h2> <pre> - redirfd [ -r | -w | -u | -a | -c | -x ] [ -n | -b ] <em>fd</em> <em>file</em> <em>prog...</em> + < [ -r | -w | -u | -a | -c | -x ] [ -n | -b ] <em>fd</em> <em>file</em> <em>prog...</em> </pre> <p> -<tt>redirfd</tt> redirects the file descriptor number <em>fd</em> +<tt><</tt> redirects the file descriptor number <em>fd</em> to <em>file</em>, then execs into <em>prog...</em>. </p> @@ -57,18 +57,18 @@ to blocking mode if it was. </li> <h2> Notes </h2> <ul> - <li> <tt>redirfd -r <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to + <li> <tt>< -r <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to <tt>sh -c 'exec prog... <em>n</em><<em>file</em>'</tt></li> - <li> <tt>redirfd -w <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to + <li> <tt>< -w <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to <tt>sh -c 'exec prog... <em>n</em>><em>file</em>'</tt></li> - <li> <tt>redirfd -u <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to + <li> <tt>< -u <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to <tt>sh -c 'exec prog... <em>n</em><><em>file</em>'</tt></li> - <li> <tt>redirfd -a <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to + <li> <tt>< -a <em>n</em> <em>file</em> prog...</tt> is roughly equivalent to <tt>sh -c 'exec prog... <em>n</em>>><em>file</em>'</tt></li> - <li> <tt>redirfd -c <em>n</em> <em>file</em> prog...</tt> has no portable + <li> <tt>< -c <em>n</em> <em>file</em> prog...</tt> has no portable shell equivalent. Some shells provide the <em>noclobber</em> option for a similar feature. </li> - <li> <tt>redirfd -x <em>n</em> <em>file</em> prog...</tt> has no portable + <li> <tt>< -x <em>n</em> <em>file</em> prog...</tt> has no portable shell equivalent.</tt> </li> </ul> @@ -81,19 +81,19 @@ named pipes. <ul> <li> Opening a fifo for reading, blocking if there is no writer: -<tt>redirfd -r <em>n</em> <em>fifo</em> prog...</tt></li> +<tt>< -r <em>n</em> <em>fifo</em> prog...</tt></li> <li> Opening a fifo for reading, with instant success even if there is no writer, and blocking at the first attempt to read from it: -<tt>redirfd -r -nb <em>n</em> <em>fifo</em> prog...</tt></li> +<tt>< -r -nb <em>n</em> <em>fifo</em> prog...</tt></li> <li> Opening a fifo for writing, blocking if there is no reader: -<tt>redirfd -w <em>n</em> <em>fifo</em> prog...</tt></li> +<tt>< -w <em>n</em> <em>fifo</em> prog...</tt></li> <li> Opening a fifo for writing, with instant success even if there is no reader: -<tt>redirfd -w -nb <em>n</em> <em>fifo</em> prog...</tt>. Warning: +<tt>< -w -nb <em>n</em> <em>fifo</em> prog...</tt>. Warning: the first attempt to write to the fifo will raise a SIGPIPE if there is still no reader at that time. The named pipe semantics normally do not allow a fifo to be open for writing without a reading end, and you -should know what you are doing if you're using <tt>redirfd</tt> +should know what you are doing if you're using <tt><</tt> this way. </li> </ul> diff --git a/doc/trap.html b/doc/trap.html index 03d5bc4..b19fd89 100644 --- a/doc/trap.html +++ b/doc/trap.html @@ -87,7 +87,7 @@ infinite (i.e. a <tt>timeout</tt> directive will never trigger). </li> <ul> <li> Programs defined in command line directives can start with -<tt><a href="importas.html">importas</a> ! !</tt> to retrieve the pid of +<tt><a href="importas.html">$</a> ! !</tt> to retrieve the pid of <em>prog</em> in <tt>${!}</tt> </li> <li> <tt>trap</tt> is a standard shell builtin, with similar functionality. It is more idiomatic, and probably more efficient, diff --git a/doc/withstdinas.html b/doc/withstdinas.html index f0db24a..75dfe80 100644 --- a/doc/withstdinas.html +++ b/doc/withstdinas.html @@ -66,7 +66,7 @@ start of the input is, up to the first null character; and execution proceeds. < <h2> Notes </h2> <ul> - <li> You can start <em>prog...</em> with "importas -u <em>variable</em> <em>variable</em>" + <li> You can start <em>prog...</em> with "$ -u <em>variable</em> <em>variable</em>" to perform variable substitution. </li> </ul> |