assignment of 'deadfl' to 0 in hunt(); bug report 4.3BSD/usr.bin/56
[unix-history] / usr / src / usr.bin / tip / tip.1
CommitLineData
2057e373
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
c6f7764d 5.\" @(#)tip.1 6.3 (Berkeley) %G%
2057e373 6.\"
075c3384 7.TH TIP 1C ""
2057e373
KM
8.UC 4
9.SH NAME
2252a1c0 10tip, cu \- connect to a remote system
2057e373 11.SH SYNOPSIS
2252a1c0 12.B tip
2057e373 13[
2252a1c0
KM
14.B \-v
15] [
16.BI \- speed
17] system-name
18.br
19.B tip
2057e373 20[
2252a1c0
KM
21.B \-v
22] [
23.BI \- speed
24] phone-number
25.br
26.B cu
27phone-number
2057e373 28[
2252a1c0
KM
29.B \-t
30] [
2057e373 31.B \-s
2252a1c0
KM
32.I speed
33] [
34.B \ -a
35.I acu
36] [
2057e373 37.B \-l
2252a1c0
KM
38.I line
39] [
40.B \-#
2057e373
KM
41]
42.SH DESCRIPTION
2252a1c0 43.I Tip
2057e373 44and
2252a1c0
KM
45.I cu
46establish a full-duplex connection to another machine,
47giving the appearance of being logged in directly on the
48remote cpu. It goes without saying that you must have a login
49on the machine (or equivalent) to which you wish to connect.
50The preferred interface is
51.IR tip .
52The
53.I cu
54interface is included for those people attached to the
55``call UNIX'' command of version 7. This manual page
56describes only
57.IR tip .
2057e373 58.PP
2252a1c0
KM
59Typed characters are normally transmitted directly to the remote
60machine (which does the echoing as well). A tilde (`~') appearing
61as the first character of a line is an escape signal; the following
62are recognized:
63.TP 10
64.B ~^D ~.
65Drop the connection and exit
66(you may still be logged in on the
67remote machine).
68.TP 10
69\fB~c \fP [\fIname\fP]
70Change directory to name (no argument
71implies change to your home directory).
72.TP 10
73.B ~!
74Escape to a shell (exiting the shell will
75return you to tip).
76.TP 10
77.B ~>
78Copy file from local to remote.
79.I Tip
80prompts for the name of a local file to transmit.
81.TP 10
82.B ~<
83Copy file from remote to local.
84.I Tip
85prompts first for the name of the file to be sent, then for
86a command to be executed on the remote machine.
87.TP 10
88\fB~p\fP \fIfrom\fP [ \fIto\fP ]
89Send a file to a remote UNIX host. The put command causes the remote UNIX
90system to run the command string ``cat > 'to''', while
91.I tip
92sends it the ``from''
93file. If the ``to'' file isn't specified the ``from'' file name is used.
94This command is actually a UNIX specific version of the ``~>'' command.
95.TP 10
96\fB~t\fP \fIfrom\fP [ \fIto\fP ]
97Take a file from a remote UNIX host.
98As in the put command the ``to'' file
99defaults to the ``from'' file name if it isn't specified.
100The remote host
101executes the command string ``cat 'from';echo ^A'' to send the file to
102.IR tip .
103.TP 10
104.B ~|
105Pipe the output from a remote command to a local UNIX process.
106The command string sent to the local UNIX system is processed by the shell.
107.TP 10
52f09821
DS
108.B ~$
109Pipe the output from a local UNIX process to the remote host.
110The command string sent to the local UNIX system is processed by the shell.
111.TP 10
2252a1c0
KM
112.B ~#
113Send a BREAK to the remote system.
114For systems which don't support the
115necessary
116.I ioctl
117call the break is simulated by a sequence of line speed changes
118and DEL characters.
119.TP 10
120.B ~s
121Set a variable (see the discussion below).
122.TP 10
123.B ~^Z
124Stop
125.I tip
126(only available with job control).
127.TP 10
c6f7764d
SL
128.B ~^Y
129Stop only the ``local side'' of
130.I tip
131(only available with job control);
132the ``remote side'' of
133.IR tip ,
134the side that displays output from the remote host, is left running.
135.TP 10
2252a1c0
KM
136.B ~?
137Get a summary of the tilde escapes
138.sp
2057e373 139.PP
2252a1c0
KM
140.I Tip
141uses the file /etc/remote to find how to reach a particular
142system and to find out how it should operate while talking
143to the system;
144refer to
145.IR remote (5)
146for a full description.
147Each system has a default baud rate with which to
148establish a connection. If this value is not suitable, the baud rate
149to be used may be specified on the command line, e.g. ``tip -300 mds''.
2057e373 150.PP
2252a1c0
KM
151When
152.I tip
153establishes a connection it sends out a
154connection message to the remote system; the default value, if any,
155is defined in /etc/remote.
2057e373 156.PP
2252a1c0
KM
157When
158.I tip
159prompts for an argument (e.g. during setup of
160a file transfer) the line typed may be edited with the standard
161erase and kill characters. A null line in response to a prompt,
162or an interrupt, will abort the dialogue and return you to the
163remote machine.
2057e373 164.PP
2252a1c0
KM
165.I Tip
166guards against multiple users connecting to a remote system
167by opening modems and terminal lines with exclusive access,
168and by honoring the locking protocol used by
169.IR uucp (1C).
2057e373 170.PP
2252a1c0
KM
171During file transfers
172.I tip
173provides a running count of the number of lines transferred.
174When using the ~> and ~< commands, the ``eofread'' and ``eofwrite''
175variables are used to recognize end-of-file when reading, and
176specify end-of-file when writing (see below). File transfers
177normally depend on tandem mode for flow control. If the remote
178system does not support tandem mode, ``echocheck'' may be set
179to indicate
180.I tip
181should synchronize with the remote system on the echo of each
182transmitted character.
2057e373 183.PP
2252a1c0
KM
184When
185.I tip
186must dial a phone number to connect to a system it will print
187various messages indicating its actions.
188.I Tip
189supports the DEC DN-11 and Racal-Vadic 831 auto-call-units;
190the DEC DF02 and DF03, Ventel 212+, Racal-Vadic 3451, and
191Bizcomp 1031 and 1032 integral call unit/modems.
2057e373 192.PP
2252a1c0
KM
193.SM
194.B VARIABLES
2057e373 195.PP
2252a1c0
KM
196.I Tip
197maintains a set of
198.I variables
199which control its operation.
200Some of these variable are read-only to normal users (root is allowed
201to change anything of interest). Variables may be displayed
202and set through the ``s'' escape. The syntax for variables is patterned
203after
204.IR vi (1)
2057e373 205and
2252a1c0
KM
206.IR Mail (1).
207Supplying ``all''
208as an argument to the set command displays all variables readable by
209the user. Alternatively, the user may request display of a particular
210variable by attaching a `?' to the end. For example ``escape?''
211displays the current escape character.
2057e373 212.PP
2252a1c0
KM
213Variables are numeric, string, character, or boolean values. Boolean
214variables are set merely by specifying their name; they may be reset
215by prepending a `!' to the name. Other variable types are set by
216concatenating an `=' and the value. The entire assignment must not
217have any blanks in it. A single set command may be used to interrogate
218as well as set a number of variables.
219Variables may be initialized at run time by placing set commands
220(without the ``~s'' prefix in a file
221.I .tiprc
222in one's home directory). The
223.B \-v
224option causes
225.I tip
226to display the sets as they are made.
227Certain common variables have abbreviations.
228The following is a list of common variables,
229their abbreviations, and their default values.
230.TP
231.B beautify
2057e373 232.br
2252a1c0
KM
233(bool) Discard unprintable characters when a session is being scripted;
234abbreviated
235.IR be .
236.TP
237.B baudrate
2057e373 238.br
2252a1c0
KM
239(num) The baud rate at which the connection was established;
240abbreviated
241.IR ba .
242.TP
243.B dialtimeout
2057e373 244.br
2252a1c0
KM
245(num) When dialing a phone number, the time (in seconds)
246to wait for a connection to be established; abbreviated
247.IR dial .
248.TP
249.B echocheck
250.br
251(bool) Synchronize with the remote host during file transfer by
252waiting for the echo of the last character transmitted; default is
253.IR off .
254.TP
255.B eofread
256.br
257(str) The set of characters which signify and end-of-tranmission
258during a ~< file transfer command; abbreviated
259.IR eofr .
260.TP
261.B eofwrite
262.br
263(str) The string sent to indicate end-of-transmission during
264a ~> file transfer command; abbreviated
265.IR eofw .
266.TP
267.B eol
268.br
269(str) The set of characters which indicate an end-of-line.
270.I Tip
271will recognize escape characters only after an end-of-line.
272.TP
273.B escape
274.br
275(char) The command prefix (escape) character; abbreviated
276.IR es ;
277default value is `~'.
278.TP
279.B exceptions
280.br
281(str) The set of characters which should not be discarded
282due to the beautification switch; abbreviated
283.IR ex ;
284default value is ``\et\en\ef\eb''.
285.TP
286.B force
287.br
288(char) The character used to force literal data transmission;
289abbreviated
290.IR fo ;
291default value is `^P'.
292.TP
293.B framesize
294.br
295(num) The amount of data (in bytes) to buffer between file system
296writes when receiving files; abbreviated
297.IR fr .
298.TP
299.B host
300.br
301(str) The name of the host to which you are connected; abbreviated
302.IR ho .
303.TP
304.B prompt
305.br
306(char) The character which indicates and end-of-line on the remote
307host; abbreviated
308.IR pr ;
309default value is `\en'. This value is used to synchronize during
310data transfers. The count of lines transferred during a file transfer
311command is based on recipt of this character.
312.TP
313.B raise
314.br
315(bool) Upper case mapping mode; abbreviated
316.IR ra ;
317default value is
318.IR off .
319When this mode is enabled, all lower case letters will be mapped to
320upper case by
321.I tip
322for transmission to the remote machine.
323.TP
324.B raisechar
325.br
326(char) The input character used to toggle upper case mapping mode;
327abbreviated
328.IR rc ;
329default value is `^A'.
330.TP
331.B record
332.br
333(str) The name of the file in which a session script is recorded;
334abbreviated
335.IR rec ;
336default value is ``tip.record''.
337.TP
338.B script
339.br
340(bool) Session scripting mode; abbreviated
341.IR sc ;
342default is
343.IR off .
344When
345.I script
346is
347.IR true ,
348.I tip
349will record everything transmitted by the remote machine in
350the script record file specified in
351.IR record .
352If the
353.I beautify
354switch is on, only printable ASCII characters will be included in
355the script file (those characters betwee 040 and 0177). The
356variable
357.I exceptions
358is used to indicate characters which are an exception to the normal
359beautification rules.
360.TP
361.B tabexpand
362.br
363(bool) Expand tabs to spaces during file transfers; abbreviated
364.IR tab ;
365default value is
366.IR false .
367Each tab is expanded to 8 spaces.
368.TP
369.B verbose
370.br
371(bool) Verbose mode; abbreviated
372.IR verb ;
373default is
374.IR true .
375When verbose mode is enabled,
376.I tip
377prints messages while dialing, shows the current number
378of lines transferred during a file transfer operations,
379and more.
380.TP
381.B SHELL
382.br
383(str) The name of the shell to use for the ~! command; default
384value is ``/bin/sh'', or taken from the environment.
385.TP
386.B HOME
387.br
388(str) The home directory to use for the ~c command; default
389value is taken from the environment.
390.PP
391.SH FILES
392.ta \w'/usr/spool/uucp/LCK..* 'u
393.nf
394/etc/remote global system descriptions
395/etc/phones global phone number data base
396${REMOTE} private system descriptions
397${PHONES} private phone numbers
398~/.tiprc initialization file.
399/usr/spool/uucp/LCK..* lock file to avoid conflicts with \fIuucp\fP
400.fi
2057e373 401.SH DIAGNOSTICS
2252a1c0
KM
402Diagnostics are, hopefully, self explanatory.
403.SH "SEE ALSO"
404remote(5),
405phones(5)
2057e373 406.SH BUGS
2252a1c0
KM
407The full set of variables is undocumented and should, probably, be
408paired down.