HP-UX Reference (11i v2 07/12) - 1 User Commands A-M (vol 1)

c
cu(1) cu(1)
form where a circumflex (ASCII 94) precedes the character, as in
ˆX. A null charac-
ter can be specified with ˆ@. (A null first character in the prompt implies a "null"
prompt, which always appears to be satisfied.) A circumflex is specified by
ˆˆ.
~%>[>]file Divert output from the remote system to the specified file until another
˜%> com-
mand is given. When an output diversion is active, typing
˜%> terminates it,
whereas
˜%> anotherfile terminates it and begins a new one. The output diversion
remains active through a ˜& subshell, but unpredictable results can occur if
input/output diversions are intermixed with
˜%take or ˜%put. The ˜%>> com-
mand appends to the named file. Note that these commands, which are interpreted
by the transmit process, are unrelated to the
˜> commands described below, which
are interpreted by the receive process.
~susp Suspend the cu session. susp is the suspend character set in the terminal when
cu
was invoked (usually ˆZ see stty(1)). As in all other lines starting with tilde, a
~susp line must be terminated by pressing Return.
Receive Process
The receive process normally copies data from the remote system to its standard output. A line from the
remote that begins with
˜> initiates an output diversion to a file. The complete sequence is:
~>[>]: file
zero or more lines to be written to file
~>
Data from the remote is diverted (or appended, if >> is used) to file. The trailing
˜> terminates the
diversion.
The use of
˜%put requires stty(1) and cat(1) on the remote side. It also requires that the current erase
and kill characters on the remote system be identical to the current ones on the local system. Backslashes
are inserted at appropriate places.
The use of ˜%take requires that the remote system support the echo and cat commands (see echo(1)
and cat(1). Also,
stty tabs mode should be set on the remote system if tabs are being copied without
expansion. When connecting to a machine that uses the eighth bit as a parity bit, stty istrip
mode
should be set on the local system.
When
cu is used on system X to connect to system Y and subsequently used on system Y to connect to sys-
tem Z, commands on system Y can be executed if ˜˜ is used. For example, using the keyboard on system
X, uname can be executed on Z, X, and Y as follows where lines 1, 3, and 5 are keyboard commands, and
lines 2, 4, and 6 are system responses:
uname
Z
~!uname
X
~˜!uname
Y
In general, ˜ causes the command to be executed on the original machine; ˜˜ causes the command to be
executed on the next machine in the chain.
EXTERNAL INFLUENCES
Environment Variables
LANG determines the language in which messages are displayed.
If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG.
If any internationalization variable contains an invalid setting, cu behaves as if all internationalization
variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
DIAGNOSTICS
Exit code is zero for normal exit; non-zero (various values) otherwise.
220 Hewlett-Packard Company 3 HP-UX 11i Version 2: December 2007 Update