Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A shell variable is just a piece of memory inside the running shell process. An Environment Variable is a variable that the shell copies into its <em>environment</em> prior to calling another program.</p> <p>To understand the limitations of Environment Variables, one must understand the concept of the <em>environment</em> of a process: It's a single section of memory that is not <em>shared</em> between processes, but <em>passed on</em> from one process to another during an <a href="http://www.kernel.org/doc/man-pages/online/pages/man3/exec.3.html" rel="nofollow noreferrer"><code>exec</code></a> system call. (See also: <a href="https://unix.stackexchange.com/questions/17758/exception-of-inheritance-of-environment-variables">Environment Variables</a>)</p> <p>The environment gets passed on from one process to the next, and subsequent processes can change it prior to calling another program.</p> <p>This environment also has certain restrictions: It can consist only of a list of nul-terminated strings, terminated by a null-pointer. Essentially, it's an array of strings.</p> <p>Note that these strings do not need to follow the <code>VARNAME=value</code> structure, which is a convention adopted by early unix shells.</p> <p><code>ksh93</code> does support shell <em>co-processes</em>, though.</p> <p>After starting a child process, the parent can connect to the child's stdin and stdout with the <code>&lt;&amp; p</code> and <code>&gt;&amp; p</code> redirection operators. It can be a challenge to handle these correctly, as many operations close their stdout on termination, which will close the pipe to the child.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload