Command Reference Guide

__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/!!!intro.1
________________________________________________________________
___ ___
c
cu(1) cu(1)
Normally, an automatic DC3/DC1 protocol is used to control input from the remote to ensure that the buffer
is not overrun. "Prompt handshaking" can be used to control transfer of ASCII files to systems that have
no type-ahead capability but require data to be sent only after a prompt is given. This is described in detail
below. Lines beginning with ˜ have special meanings.
Transmit Process Commands
The transmit process interprets the following commands:
~., ˜.. Terminate the conversation. On hard-wired lines, ˜. sends several EOF characters
to log out the session, whereas ˜.. suppresses the EOF sequence. In general the
remote hard-wired machine is unaware of the disconnect if ˜.. is used. On dial-up
connections, ˜. and ˜.. do not differ.
~! Escape to an interactive shell on the local system.
~!cmd ... Run cmd on the local system (via sh -c).
~& Similar to ˜! but kill the receive process, restarting it upon return from the shell.
This is useful for invoking sub-processes that read from the communication line where
the receive process would otherwise compete for input.
~&cmd ... Run cmd on the local system (via
sh -c) and kill the receive process, restarting it
later.
~| cmd Pipe incoming data from the remote system through the standard input to cmd on the
local system. To terminate, reset with either a
˜& or ˜| command.
~| Resets the receive process following a ˜|cmd command.
~$cmd ... Run cmd locally and send its output to the remote system.
~%cd Change the directory on the local system. Note: ˜!cd causes the command to be
run by a sub-shell, causing a return to the current directory upon completion.
~%take remote_source_file
[local_destination_file ]
Copy file remote_source_file from the remote system to file local_destination_file on
the local system. If local_destination_file is not specified, the remote_source_file argu-
ment is used in both places.
~%put local_source_file
[remote_destination_file ]
Copy file local_source_file on local system to file remote_destination_file on remote sys-
tem. If remote_destination_file is not specified, the local_source_file argument is used
in both places.
... Send the line ˜ ... to the remote system. If you use cu on the remote system to
access a third remote system, send
˜˜. to cause the second remote cu to exit.
~%break Transmit a BREAK to the remote system.
~%nostop Toggle between DC3/DC1 input control protocol and no input control. This is useful if
the remote system does not respond properly to the DC3 and DC1 characters.
~%<file Send the contents of the local file to the remote system using prompt handshaking.
The specified file is read one line at a time, and each line is sent to the remote system
when the prompt sequence is received. If no prompt is received by the time the
prompt timeout occurs, the line is sent anyway. If the timeout is set to 0 seconds, or if
the first character in the prompt sequence is a null character (ˆ@), the handshake
always appears to be satisfied immediately, regardless of whether or not the remote
system generates a prompt. This capability is intended mainly to facilitate transfer of
ASCII files from HP-UX to an HP 3000 system running MPE. This is usually accom-
plished by running the MPE
FCOPY utility and giving the command
from=;to=destfile;new and then running the cu input diversion to send the file to
FCOPY which saves it in destfile. This facility might be useful with other systems
also, such as an HP 1000 running RTE.
~%setpt n Specify the number of seconds to wait for a prompt before giving up. The default is 2
seconds. Specifying a timeout of 0 seconds disables handshaking; that is, handshake
appears to complete immediately.
~%setps xy Set the handshake prompt to the characters xy. The default is DC1. The prompt can
be any one or two characters. To specify a control character for x or y, use the Ctrl-X
Section 1154 2 HP-UX Release 11i: December 2000
___
___