98 lines
2.3 KiB
HTML
98 lines
2.3 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content=
|
|
"text/html; charset=utf-8">
|
|
<title>export - Set export attribute for variables</title>
|
|
<LINK rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</HEAD>
|
|
<body bgcolor="#FFFFFF">
|
|
<!-- Java sync-link -->
|
|
<SCRIPT LANGUAGE="Javascript" SRC="../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
|
|
|
|
|
|
|
<h2>export - Set export attribute for variables</h2>
|
|
|
|
<strong>Synopsis</strong>
|
|
|
|
<p><strong>export [ -ps ]</strong> [ <em>name</em> [ <em>
|
|
=value</em> ] ... ]</p>
|
|
|
|
<p><strong>Description</strong></p>
|
|
|
|
<p>You can use <strong>export</strong> to set the export attribute
|
|
for the variables specified by <em>name</em>. A variable with the
|
|
export attribute is automatically placed in the environment of
|
|
subsequently executed commands.</p>
|
|
|
|
<p>When no arguments are specified, <strong>qsh</strong> displays a
|
|
list of all the variables with the export attribute and their
|
|
values.</p>
|
|
|
|
<p><strong>Options</strong></p>
|
|
|
|
<dl>
|
|
<dt><strong>-p</strong></dt>
|
|
|
|
<dd>Precede each line of the output with the word "export " so it
|
|
is displayed in a re-enterable format.</dd>
|
|
|
|
<dt><strong>-s</strong></dt>
|
|
|
|
<dd>Also set the variable as an environment variable in the current
|
|
process.</dd>
|
|
</dl>
|
|
|
|
<p><strong>Operands</strong></p>
|
|
|
|
<p>Each <em>name</em> specifies a variable in the current
|
|
environment. If a <em>value</em> is also specified, the value of
|
|
the variable is updated.</p>
|
|
|
|
<p><strong>Exit Status</strong></p>
|
|
|
|
<ul>
|
|
<li>0 when successful.</li>
|
|
</ul>
|
|
|
|
<p><strong>Related information</strong></p>
|
|
|
|
<ul>
|
|
<li><a href="declare.htm">declare - Declare variables and set attributes</a></li>
|
|
|
|
<li><a href="local.htm">local - Assign a local variable in a function</a></li>
|
|
|
|
<li><a href="readonly.htm">readonly - Set read-only attribute for variables</a></li>
|
|
|
|
<li><a href="set.htm">set - Set or unset options and positional parameters</a></li>
|
|
|
|
<li><a href="unset.htm">unset - Unset values of variables and functions</a></li>
|
|
</ul>
|
|
|
|
<strong>Examples</strong>
|
|
|
|
<ol>
|
|
<li>Set the export attribute for an existing variable:
|
|
<pre>
|
|
export ALPHA
|
|
</pre>
|
|
</li>
|
|
|
|
<li>Set the value and export attribute of a new variable:
|
|
<pre>
|
|
export ALPHA=one
|
|
</pre>
|
|
</li>
|
|
|
|
<li>List all variables with the export attribute:
|
|
<pre>
|
|
export
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
</body>
|
|
</html>
|
|
|