357 lines
13 KiB
HTML
357 lines
13 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta name="generator" content="HTML Tidy, see www.w3.org">
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
<link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group's rhtm tool v1.2.1 -->
|
|
<!-- Copyright (c) 2001 The Open Group, All Rights Reserved -->
|
|
<title>uux</title>
|
|
</head>
|
|
<body bgcolor="white">
|
|
<script type="text/javascript" language="JavaScript" src="../jscript/codes.js">
|
|
</script>
|
|
|
|
<basefont size="3"> <a name="uux"></a> <a name="tag_04_165"></a><!-- uux -->
|
|
<!--header start-->
|
|
<center><font size="2">The Open Group Base Specifications Issue 6<br>
|
|
IEEE Std 1003.1-2001<br>
|
|
Copyright © 2001 The IEEE and The Open Group, All Rights reserved.</font></center>
|
|
|
|
<!--header end-->
|
|
<hr size="2" noshade>
|
|
<h4><a name="tag_04_165_01"></a>NAME</h4>
|
|
|
|
<blockquote>uux - remote command execution</blockquote>
|
|
|
|
<h4><a name="tag_04_165_02"></a>SYNOPSIS</h4>
|
|
|
|
<blockquote class="synopsis">
|
|
<div class="box"><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
|
|
"[Option Start]" border="0"> uux</tt> <b>[</b><tt>-np</tt><b>]</b> <i>command-string</i><tt><br>
|
|
<br>
|
|
uux</tt> <b>[</b><tt>-jnp</tt><b>]</b> <i>command-string</i><tt><img src="../images/opt-end.gif" alt="[Option End]" border=
|
|
"0"></tt></code></div>
|
|
|
|
<tt><br>
|
|
</tt></blockquote>
|
|
|
|
<h4><a name="tag_04_165_03"></a>DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>uux</i> utility shall gather zero or more files from various systems, execute a shell pipeline (see <a href=
|
|
"xcu_chap02.html#tag_02_09"><i>Shell Commands</i></a> ) on a specified system, and then send the standard output of the command to
|
|
a file on a specified system. Only the first command of a pipeline can have a <i>system-name</i>! prefix. All other commands in the
|
|
pipeline shall be executed on the system of the first command.</p>
|
|
|
|
<p>The following restrictions are applicable to the shell pipeline processed by <i>uux</i>:</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<p>In gathering files from different systems, pathname expansion shall not be performed by <i>uux</i>. Thus, a request such as:</p>
|
|
|
|
<pre>
|
|
<tt>uux "c99 remsys!˜/*.c"
|
|
</tt>
|
|
</pre>
|
|
|
|
<p>would attempt to copy the file named literally <b>*.c</b> to the local system.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The redirection operators <tt>">>"</tt> , <tt>"<<"</tt> , <tt>">|"</tt> , and <tt>">&"</tt> shall not be
|
|
accepted. Any use of these redirection operators shall cause this utility to write an error message describing the problem and exit
|
|
with a non-zero exit status.</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The reserved word <b>!</b> cannot be used at the head of the pipeline to modify the exit status. (See the <i>command-string</i>
|
|
operand description below.)</p>
|
|
</li>
|
|
|
|
<li>
|
|
<p>Alias substitution shall not be performed.</p>
|
|
</li>
|
|
</ul>
|
|
|
|
<p>A filename can be specified as for <a href="../utilities/uucp.html"><i>uucp</i></a>; it can be an absolute pathname, a pathname
|
|
preceded by ˜ <i>name</i> (which is replaced by the corresponding login directory), a pathname specified as ˜/
|
|
<i>dest</i> ( <i>dest</i> is prefixed by the public directory called <i>PUBDIR</i>; the actual location of <i>PUBDIR</i> is
|
|
implementation-defined), or a simple filename (which is prefixed by <i>uux</i> with the current directory). See <a href=
|
|
"uucp.html"><i>uucp</i></a> for the details.</p>
|
|
|
|
<p>The execution of commands on remote systems shall take place in an execution directory known to the <a href=
|
|
"../utilities/uucp.html"><i>uucp</i></a> system. All files required for the execution shall be put into this directory unless they
|
|
already reside on that machine. Therefore, the application shall ensure that non-local filenames (without path or machine
|
|
reference) are unique within the <i>uux</i> request.</p>
|
|
|
|
<p>The <i>uux</i> utility shall attempt to get all files to the execution system. For files that are output files, the application
|
|
shall ensure that the filename is escaped using parentheses.</p>
|
|
|
|
<p>The remote system shall notify the user by mail if the requested command on the remote system was disallowed or the files were
|
|
not accessible. This notification can be turned off by the <b>-n</b> option.</p>
|
|
|
|
<p>Typical implementations of this utility require a communications line configured to use the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap11.html#tag_11">Chapter 11, General Terminal Interface</a>, but other
|
|
communications means may be used. On systems where there are no available communications means (either temporarily or permanently),
|
|
this utility shall write an error message describing the problem and exit with a non-zero exit status.</p>
|
|
|
|
<p>The <i>uux</i> utility cannot guarantee support for all character encodings in all circumstances. For example, transmission data
|
|
may be restricted to 7 bits by the underlying network, 8-bit data and filenames need not be portable to non-internationalized
|
|
systems, and so on. Under these circumstances, it is recommended that only characters defined in the ISO/IEC 646:1991 standard
|
|
International Reference Version (equivalent to ASCII) 7-bit range of characters be used and that only characters defined in the
|
|
portable filename character set be used for naming files.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_04"></a>OPTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>The <i>uux</i> utility shall conform to the Base Definitions volume of IEEE Std 1003.1-2001, <a href=
|
|
"../basedefs/xbd_chap12.html#tag_12_02">Section 12.2, Utility Syntax Guidelines</a>.</p>
|
|
|
|
<p>The following options shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><b>-p</b></dt>
|
|
|
|
<dd>Make the standard input to <i>uux</i> the standard input to the <i>command-string</i>.</dd>
|
|
|
|
<dt><b>-j</b></dt>
|
|
|
|
<dd>Write the job identification string to standard output. This job identification can be used by <a href=
|
|
"../utilities/uustat.html"><i>uustat</i></a> to obtain the status or terminate a job.</dd>
|
|
|
|
<dt><b>-n</b></dt>
|
|
|
|
<dd>Do not notify the user if the command fails.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_05"></a>OPERANDS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following operand shall be supported:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>command-string</i></dt>
|
|
|
|
<dd><br>
|
|
A string made up of one or more arguments that are similar to normal command arguments, except that the command and any filenames
|
|
can be prefixed by <i>system-name</i>!. A null <i>system-name</i> shall be interpreted as the local system.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_06"></a>STDIN</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard input shall not be used unless the <tt>'-'</tt> or <b>-p</b> option is specified; in those cases, the standard
|
|
input shall be made the standard input of the <i>command-string</i>.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_07"></a>INPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>Input files shall be selected according to the contents of <i>command-string</i>.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_08"></a>ENVIRONMENT VARIABLES</h4>
|
|
|
|
<blockquote>
|
|
<p>The following environment variables shall affect the execution of <i>uux</i>:</p>
|
|
|
|
<dl compact>
|
|
<dt><i>LANG</i></dt>
|
|
|
|
<dd>Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
|
|
IEEE Std 1003.1-2001, <a href="../basedefs/xbd_chap08.html#tag_08_02">Section 8.2, Internationalization Variables</a> for
|
|
the precedence of internationalization variables used to determine the values of locale categories.)</dd>
|
|
|
|
<dt><i>LC_ALL</i></dt>
|
|
|
|
<dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
|
|
|
|
<dt><i>LC_CTYPE</i></dt>
|
|
|
|
<dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
|
|
opposed to multi-byte characters in arguments).</dd>
|
|
|
|
<dt><i>LC_MESSAGES</i></dt>
|
|
|
|
<dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard
|
|
error.</dd>
|
|
|
|
<dt><i>NLSPATH</i></dt>
|
|
|
|
<dd>Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i></dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_09"></a>ASYNCHRONOUS EVENTS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_10"></a>STDOUT</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard output shall not be used unless the <b>-j</b> option is specified; in that case, the job identification string
|
|
shall be written to standard output in the following format:</p>
|
|
|
|
<pre>
|
|
<tt>"%s\n", <</tt><i>jobid</i><tt>>
|
|
</tt>
|
|
</pre>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_11"></a>STDERR</h4>
|
|
|
|
<blockquote>
|
|
<p>The standard error shall be used only for diagnostic messages.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_12"></a>OUTPUT FILES</h4>
|
|
|
|
<blockquote>
|
|
<p>Output files shall be created or written, or both, according to the contents of <i>command-string</i>.</p>
|
|
|
|
<p>If <b>-n</b> is not used, mail files shall be modified following any command or file-access failures on the remote system.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_13"></a>EXTENDED DESCRIPTION</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_14"></a>EXIT STATUS</h4>
|
|
|
|
<blockquote>
|
|
<p>The following exit values shall be returned:</p>
|
|
|
|
<dl compact>
|
|
<dt> 0</dt>
|
|
|
|
<dd>Successful completion.</dd>
|
|
|
|
<dt>>0</dt>
|
|
|
|
<dd>An error occurred.</dd>
|
|
</dl>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_15"></a>CONSEQUENCES OF ERRORS</h4>
|
|
|
|
<blockquote>
|
|
<p>Default.</p>
|
|
</blockquote>
|
|
|
|
<hr>
|
|
<div class="box"><em>The following sections are informative.</em></div>
|
|
|
|
<h4><a name="tag_04_165_16"></a>APPLICATION USAGE</h4>
|
|
|
|
<blockquote>
|
|
<p>Note that, for security reasons, many installations limit the list of commands executable on behalf of an incoming request from
|
|
<i>uux</i>. Many sites permit little more than the receipt of mail via <i>uux</i>.</p>
|
|
|
|
<p>Any characters special to the command interpreter should be quoted either by quoting the entire <i>command-string</i> or quoting
|
|
the special characters as individual arguments.</p>
|
|
|
|
<p>As noted in <a href="../utilities/uucp.html"><i>uucp</i></a>, shell pattern matching notation characters appearing in pathnames
|
|
are expanded on the appropriate local system. This is done under the control of local settings of <i>LC_COLLATE</i> and <i>LC_CTYPE
|
|
.</i> Thus, care should be taken when using bracketed filename patterns, as collation and typing rules may vary from one system to
|
|
another. Also be aware that certain types of expression (that is, equivalence classes, character classes, and collating symbols)
|
|
need not be supported on non-internationalized systems. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_17"></a>EXAMPLES</h4>
|
|
|
|
<blockquote>
|
|
<ol>
|
|
<li>
|
|
<p>The following command gets <b>file1</b> from system <b>a</b> and <b>file2</b> from system <b>b</b>, executes <a href=
|
|
"../utilities/diff.html"><i>diff</i></a> on the local system, and puts the results in <b>file.diff</b> in the local <i>PUBDIR</i>
|
|
directory. ( <i>PUBDIR</i> is the <a href="../utilities/uucp.html"><i>uucp</i></a> public directory on the local system.)</p>
|
|
|
|
<pre>
|
|
<tt>uux "!diff a!/usr/file1 b!/a4/file2 >!˜/file.diff"
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The following command fails because <i>uux</i> places all files copied to a system in the same working directory. Although the
|
|
files <b>xyz</b> are from two different systems, their filenames are the same and conflict.</p>
|
|
|
|
<pre>
|
|
<tt>uux "!diff a!/usr1/xyz b!/usr2/xyz >!˜/xyz.diff"
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
|
|
<li>
|
|
<p>The following command succeeds (assuming <a href="../utilities/diff.html"><i>diff</i></a> is permitted on system <b>a</b>)
|
|
because the file local to system <b>a</b> is not copied to the working directory, and hence does not conflict with the file from
|
|
system <b>c</b>.</p>
|
|
|
|
<pre>
|
|
<tt>uux "a!diff a!/usr/xyz c!/usr/xyz >!˜/xyz.diff"
|
|
</tt>
|
|
</pre>
|
|
</li>
|
|
</ol>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_18"></a>RATIONALE</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_19"></a>FUTURE DIRECTIONS</h4>
|
|
|
|
<blockquote>
|
|
<p>None.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_20"></a>SEE ALSO</h4>
|
|
|
|
<blockquote>
|
|
<p><a href="xcu_chap02.html#tag_02"><i>Shell Command Language</i></a> , <a href="uucp.html"><i>uucp</i></a> , <a href=
|
|
"uuencode.html"><i>uuencode</i></a> , <a href="uustat.html"><i>uustat</i></a></p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_21"></a>CHANGE HISTORY</h4>
|
|
|
|
<blockquote>
|
|
<p>First released in Issue 2.</p>
|
|
</blockquote>
|
|
|
|
<h4><a name="tag_04_165_22"></a>Issue 6</h4>
|
|
|
|
<blockquote>
|
|
<p>The obsolescent SYNOPSIS is removed.</p>
|
|
|
|
<p>The normative text is reworded to avoid use of the term "must" for application requirements.</p>
|
|
|
|
<p>The UN margin code and associated shading are removed from the <b>-j</b> option in response to The Open Group Base Resolution
|
|
bwg2001-003.</p>
|
|
</blockquote>
|
|
|
|
<div class="box"><em>End of informative text.</em></div>
|
|
|
|
<hr>
|
|
<hr size="2" noshade>
|
|
<center><font size="2"><!--footer start-->
|
|
UNIX ® is a registered Trademark of The Open Group.<br>
|
|
POSIX ® is a registered Trademark of The IEEE.<br>
|
|
[ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
|
|
"../utilities/contents.html">XCU</a> | <a href="../functions/contents.html">XSH</a> | <a href="../xrat/contents.html">XRAT</a>
|
|
]</font></center>
|
|
|
|
<!--footer end-->
|
|
<hr size="2" noshade>
|
|
</body>
|
|
</html>
|
|
|