1CU(1C) CU(1C)
2
3
4
6 cu - call UNIX
7
9 cu telno [ -t ] [ -s speed ] [ -a acu ] [ -l line ]
10
12 Cu calls up another UNIX system, a terminal, or possibly a non-UNIX
13 system. It manages an interactive conversation with possible transfers
14 of text files. Telno is the telephone number, with minus signs at
15 appropriate places for delays. The -t flag is used to dial out to a
16 terminal. Speed gives the transmission speed (110, 134, 150, 300,
17 1200); 300 is the default value.
18
19 The -a and -l values may be used to specify pathnames for the ACU and
20 communications line devices. They can be used to override the follow‐
21 ing built-in choices:
22
23 -a /dev/cua0 -l /dev/cul0
24
25 After making the connection, cu runs as two processes: the send process
26 reads the standard input and passes most of it to the remote system;
27 the receive process reads from the remote system and passes most data
28 to the standard output. Lines beginning with `~' have special mean‐
29 ings.
30
31 The send process interprets the following:
32
33 ~. terminate the conversation.
34 ~EOT terminate the conversation
35
36 ~<file send the contents of file to the remote system, as
37 though typed at the terminal.
38
39 ~! invoke an interactive shell on the local system.
40
41 ~!cmd ... run the command on the local system (via sh -c).
42
43 ~$cmd ... run the command locally and send its output to the
44 remote system.
45
46 ~%take from [to] copy file `from' (on the remote system) to file `to'
47 on the local system. If `to' is omitted, the `from'
48 name is used both places.
49
50 ~%put from [to] copy file `from' (on local system) to file `to' on
51 remote system. If `to' is omitted, the `from' name
52 is used both places.
53
54 ~~... send the line `~...'.
55
56 The receive process handles output diversions of the following form:
57
58 ~>[>][:]file
59 zero or more lines to be written to file
60 ~>
61
62 In any case, output is diverted (or appended, if `>>' used) to the
63 file. If `:' is used, the diversion is silent, i.e., it is written
64 only to the file. If `:' is omitted, output is written both to the
65 file and to the standard output. The trailing `~>' terminates the
66 diversion.
67
68 The use of ~%put requires stty and cat on the remote side. It also
69 requires that the current erase and kill characters on the remote sys‐
70 tem be identical to the current ones on the local system. Backslashes
71 are inserted at appropriate places.
72
73 The use of ~%take requires the existence of echo and tee on the remote
74 system. Also, stty tabs mode is required on the remote system if tabs
75 are to be copied without expansion.
76
78 /dev/cua0
79 /dev/cul0
80 /dev/null
81
83 dn(4), tty(4)
84
86 Exit code is zero for normal exit, nonzero (various values) otherwise.
87
89 The syntax is unique.
90
91
92
93 CU(1C)