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