.\" catt.l	1.5 (CARL) 12/9/81  19:11:21
.TH CATT LOCAL 
.SH NAME
catt, cu \- connect to remote computer
.SH SYNOPSIS
.B catt
[
.BR \-s speed
]
[
.BR \-l line
]
[
.BR \-m machine
]
[
.B \-w
]
.br
.B cu
[
.BR \-s speed
]
[
.BR \-l line
]
[
.B \-w
]
telno
.SH DESCRIPTION
.I Catt
and
.I cu
connect to a remote computer.
.I catt
is used to connect to a computer on
the computer center's dataswitch.
.I cu
is used to connect to a computer via the
automatic calling unit.
Both programs manage an interactive conversation
with possible transfers of text files.
.PP
Both programs
program recognize several flags.
The
.BR \-s ""
flag may be used to specify the transmission
speed (for catt: 110, 150, 300, 1200, etc., for
cu: either 300 or 1200).
The
.BR \-l ""
flag may be used to
specify a name
for the communications line (for catt: /dev/dsw0, /dev/dsw1,
etc., for cu /dev/acu0, /dev/acu1, etc.).
The
.BR \-m
flag is only recognized by the
.I catt
program,
it may be used to specify the machine
(catta, cattb, eecs, phonlab, vax, 7800).
These flags can be used to override the following
built-in defaults:
.PP
.BR \-s 2400
.BR \-l /dev/dsw0
.BR \-m catta
(catt)
.PP
.BR \-s 1200
.BR \-l /dev/acu0
(cu)
.PP
The
.BR \-w ""
flag
is only recognized by the
.I catt
program, it may be used to specify that the program should terminate
if there are no available ports to the requested machine.
.PP
Lines beginning with `~' have special meanings and are
interpreted as commands.
.I catt
and
.I cu
recognise the following commands:
.TP 18
~\|\fB.\|
terminate the conversation.
.TP 18
~<file
send the contents of
.I file
to the remote system,
as though typed at the terminal.
.TP 18
~!
invoke an interactive shell on the local system.
.TP 18
~!cmd ...
run the command
.I cmd
on the local system.
.TP 18
~$cmd ...
run the command
.I cmd
locally and send its output
to the remote system.
.TP 18
~%cd dir
change to the directory
.I dir
on the local system.
.TP 18
~%speed speed
change the dataswitch line speed to
.I speed.
.TP 18
~%take from [to]
copy file ``from'' (on the remote system)
to file ``to'' on the local system.
If ``to'' is omitted,
the ``from'' name is used both places.
.TP 18
~%put from [to]
copy file ``from'' (on local system)
to file ``to'' on remote system.
If ``to'' is omitted, the ``from'' name is used both places.
.TP 18
~:
during an output diversion, this toggles silent mode (initially
on) on or off i.e., whether information recieved from the remote
system will be written to the standard output.
This allows a ``progress report'' during long transfers.
.TP 18
~?
print a list of the available commands and their syntax.
.TP 18
~~\fB\|.\|.\|.\fR
send
the line `~\|.\|.\|.'.
.PP
.I catt
and
.I cu
handle output diversions of the
following generalised form:
.PP
\&~>[>][:]file
.br
zero or more lines to be written to file on local system
.br
\&~>
.PP
In any case, output is diverted (or appended, if `>>' used) to the file.
If `:' is used,
the diversion is
.I silent,
i.e., it is written only to the file.
If `:' is omitted,
output is written both to the file and to the standard output.
The trailing `~>' terminates the diversion.
.PP
The use of
.B ~%speed
requires the existence of the
.I stty
command on the remote computer.
.PP
The use of
.B  ~%put
requires the existence of the
.I stty
and
.I cat
commands on the remote computer.
It also requires that the
current erase and kill characters on the remote
computer be identical to the current ones on the local computer.
Backslashes are inserted at appropriate places.
.PP
The use of
.B  ~%take
requires the existence of the
.I echo
and
.I tee
commands on the remote computer.
Also,
.B "stty tabs"
mode is required on the remote computer if
tabs are to be copied without expansion.
.SH FILES
/dev/dsw0
.br
/dev/acu0
.br
/dev/null
.SH "SEE ALSO"
cu(1), tty(4)
.SH DIAGNOSTICS
Various complaints about local tty line being busy,
dead remote system, no available remote system ports,
or possible dataswitch error.
Exit code is
zero for normal exit,
nonzero otherwise.
.SH BUGS
Long transfers can sometimes be difficult to terminate prematurely;
try using `~:' followed by
pressing the DEL or RUBOUT key.
.PP
The
.I catt
program defaults to running at the highest speed possible
and transfers may not always work since it may be difficult
for the remote system to keep up with such a high transfer rate,
particularly if it is heavily loaded.
Try reconnecting at 300 baud (\fIcatt \-s300\fP).
.SH NOTE
Since there is an abundance of public terminals for the dataswitch
the
.I catt
program generally should only be used to transfer files,
particularly when there is scarcity of available terminals.
