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