ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzahz_5.4.0.1/qsh.htm

130 lines
3.8 KiB
HTML
Raw Normal View History

2024-04-02 14:02:31 +00:00
<!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>qsh - Qshell command language interpreter</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>qsh - Qshell command language interpreter</h2>
<strong>Synopsis</strong>
<p>
<strong>qsh [-abCefFijlmntuvx] [-o</strong> <em>
option</em><strong>]</strong> <em>command_file arg ...</em></p>
<p><strong>qsh -c [-abCefFijlmntuvx] [-o</strong> <em>
option</em><strong>]</strong> <em>command_string</em></p>
<p><strong>qsh -s [-abCefFijlmntuvx] [-o</strong> <em>
option</em><strong>]</strong> <em>arg ...</em>
</p>
<p><strong>Description</strong></p>
<p>The <strong>qsh</strong> utility is the Qshell command language
interpreter. In the first synopsis form, <strong>qsh</strong> reads
the specified <em>command_file</em> and runs the commands contained
in the file. In the second synopsis form, <strong>qsh</strong> runs
the specified <em>command_string</em> and ends. In the third
synopsis form, <strong>qsh</strong> reads commands from standard
input.</p>
<p><strong>Options</strong></p>
<p>The <strong>a, b, C, e, f, F, j, l, m, n, -o</strong> <em>
option</em> <strong>t, u, v,</strong> and <strong>x</strong>
options are described in <a href="set.htm">set - Set or unset
options and positional parameters</a>.</p>
<dl>
<dt><strong>-c</strong></dt>
<dd>Run the command specified in <em>command_string</em> and
exit.</dd>
<dt><strong>-i</strong></dt>
<dd>The shell is interactive. If there are no operands and standard
input is connected to a terminal, the <strong>-i</strong> option is
set by default.</dd>
<dt><strong>-s</strong></dt>
<dd>Read commands from standard input. If there are no operands and
the <strong>-c</strong> option is not specified, the <strong>
-s</strong> option is set by default.</dd>
</dl>
<p><strong>Operands</strong></p>
<p>The <em>command_file</em> is the pathname of a regular file that
contains Qshell commands. If the pathname does not contain a slash
(/) character, <strong>qsh</strong> searches for <em>
command_file</em> using the <strong>PATH</strong> variable. The
special parameter 0 is set to the value of <em>command_file</em>.
Each <em>arg</em> is a positional parameter.</p>
<p>The <em>command_string</em> is any Qshell command, including
compound commands.</p>
<p><strong>Exit Status</strong></p>
<p>
<ul>
<li>0 when successful.</li>
<li>1 when unsuccessful.</li>
<li>2 when an error occurred in a script.</li>
<li>3 when there was an unexpected exception in a root shell.</li>
<li>4 when there was an unexpected exception in an exception handler for a root shell.</li>
<li>5 when there was an unexpected exception in a child shell.</li>
<li>6 when there was an unexpected exception in an exception handler for a child shell.</li>
<li>7 when descriptor 0 was not available.</li>
<li>8 when descriptor 1 was not available.</li>
<li>9 when descriptor 2 was not available.</li>
<li>10 when there was an error opening the message catalog.</li>
<li>11-125 when unsuccessful.</li>
<li>126 when a command was found but could not be invoked.</li>
<li>127 when a command cannot be found.</li>
<li>&gt;128 when a command was ended by a signal. The value is 128 plus the signal number.</li>
</ul>
</p>
<p><strong>Related information</strong></p>
<ul>
<li><a href="exit.htm">exit - Exit from the shell</a></li>
<li><a href="set.htm">set - Set or unset options and positional
parameters</a></li>
<li><a href="shell.htm">Qshell command language</a></li>
</ul>
<!-- end ibmbody========================================================= -->
</body>
</html>