xref: /original-bsd/usr.bin/tip/tip.1 (revision 1897046e)
1.\" Copyright (c) 1980, 1990 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"	@(#)tip.1	6.8 (Berkeley) 07/27/91
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 \&~#
118Send a
119.Dv BREAK
120to the remote system.
121For systems which don't support the
122necessary
123.Ar ioctl
124call the break is simulated by a sequence of line speed changes
125and
126.Dv DEL
127characters.
128.It Ic \&~s
129Set a variable (see the discussion below).
130.It Ic \&~^Z
131Stop
132.Nm tip
133(only available with job control).
134.It Ic \&~^Y
135Stop only the ``local side'' of
136.Nm tip
137(only available with job control);
138the ``remote side'' of
139.Nm tip  ,
140the side that displays output from the remote host, is left running.
141.It Ic \&~?
142Get a summary of the tilde escapes
143.El
144.Pp
145.Nm Tip
146uses the file
147.Pa /etc/remote
148to find how to reach a particular
149system and to find out how it should operate while talking
150to the system;
151refer to
152.Xr remote  5
153for a full description.
154Each system has a default baud rate with which to
155establish a connection.  If this value is not suitable, the baud rate
156to be used may be specified on the command line, e.g.
157.Ql "tip -300 mds" .
158.Pp
159When
160.Nm tip
161establishes a connection it sends out a
162connection message to the remote system; the default value, if any,
163is defined in
164.Pa /etc/remote
165(see
166.Xr remote 5 ) .
167.Pp
168When
169.Nm 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.
175.Pp
176.Nm 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.Xr uucp 1 .
181.Pp
182During file transfers
183.Nm 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.Nm tip
192should synchronize with the remote system on the echo of each
193transmitted character.
194.Pp
195When
196.Nm tip
197must dial a phone number to connect to a system it will print
198various messages indicating its actions.
199.Nm Tip
200supports the
201.Tn DEC DN Ns-11
202and
203Racal-Vadic 831 auto-call-units;
204the
205.Tn DEC DF Ns \&02
206and
207.Tn DF Ns \&03 ,
208Ventel 212+, Racal-Vadic 3451, and
209Bizcomp 1031 and 1032 integral call unit/modems.
210.Ss VARIABLES
211.Nm Tip
212maintains a set of
213.Ar variables
214which control its operation.
215Some of these variable are read-only to normal users (root is allowed
216to change anything of interest).  Variables may be displayed
217and set through the ``s'' escape.  The syntax for variables is patterned
218after
219.Xr vi  1
220and
221.Xr Mail  1  .
222Supplying ``all''
223as an argument to the set command displays all variables readable by
224the user.  Alternatively, the user may request display of a particular
225variable by attaching a `?' to the end.  For example ``escape?''
226displays the current escape character.
227.Pp
228Variables are numeric, string, character, or boolean values.  Boolean
229variables are set merely by specifying their name; they may be reset
230by prepending a `!' to the name.  Other variable types are set by
231concatenating an `=' and the value.  The entire assignment must not
232have any blanks in it.  A single set command may be used to interrogate
233as well as set a number of variables.
234Variables may be initialized at run time by placing set commands
235(without the ``~s'' prefix in a file
236.Pa .tiprc
237in one's home directory).  The
238.Fl v
239option causes
240.Nm tip
241to display the sets as they are made.
242Certain common variables have abbreviations.
243The following is a list of common variables,
244their abbreviations, and their default values.
245.Bl -tag -width Ar
246.It Ar beautify
247(bool) Discard unprintable characters when a session is being scripted;
248abbreviated
249.Ar be  .
250.It Ar baudrate
251(num) The baud rate at which the connection was established;
252abbreviated
253.Ar ba  .
254.It Ar dialtimeout
255(num) When dialing a phone number, the time (in seconds)
256to wait for a connection to be established; abbreviated
257.Ar dial  .
258.It Ar echocheck
259(bool) Synchronize with the remote host during file transfer by
260waiting for the echo of the last character transmitted; default is
261.Ar off  .
262.It Ar eofread
263(str) The set of characters which signify and end-of-tranmission
264during a ~< file transfer command; abbreviated
265.Ar eofr  .
266.It Ar eofwrite
267(str) The string sent to indicate end-of-transmission during
268a ~> file transfer command; abbreviated
269.Ar eofw  .
270.It Ar eol
271(str) The set of characters which indicate an end-of-line.
272.Nm Tip
273will recognize escape characters only after an end-of-line.
274.It Ar escape
275(char) The command prefix (escape) character; abbreviated
276.Ar es  ;
277default value is `~'.
278.It Ar exceptions
279(str) The set of characters which should not be discarded
280due to the beautification switch; abbreviated
281.Ar ex  ;
282default value is ``\et\en\ef\eb''.
283.It Ar force
284(char) The character used to force literal data transmission;
285abbreviated
286.Ar fo  ;
287default value is `^P'.
288.It Ar framesize
289(num) The amount of data (in bytes) to buffer between file system
290writes when receiving files; abbreviated
291.Ar fr  .
292.It Ar host
293(str) The name of the host to which you are connected; abbreviated
294.Ar ho  .
295.It Ar prompt
296(char) The character which indicates and end-of-line on the remote
297host; abbreviated
298.Ar pr  ;
299default value is `\en'.  This value is used to synchronize during
300data transfers.  The count of lines transferred during a file transfer
301command is based on recipt of this character.
302.It Ar raise
303(bool) Upper case mapping mode; abbreviated
304.Ar ra  ;
305default value is
306.Ar off  .
307When this mode is enabled, all lower case letters will be mapped to
308upper case by
309.Nm tip
310for transmission to the remote machine.
311.It Ar raisechar
312(char) The input character used to toggle upper case mapping mode;
313abbreviated
314.Ar rc  ;
315default value is `^A'.
316.It Ar record
317(str) The name of the file in which a session script is recorded;
318abbreviated
319.Ar rec  ;
320default value is ``tip.record''.
321.It Ar script
322(bool) Session scripting mode; abbreviated
323.Ar sc  ;
324default is
325.Ar off  .
326When
327.Ar script
328is
329.Li true  ,
330.Nm tip
331will record everything transmitted by the remote machine in
332the script record file specified in
333.Ar record  .
334If the
335.Ar beautify
336switch is on, only printable
337.Tn ASCII
338characters will be included in
339the script file (those characters betwee 040 and 0177).  The
340variable
341.Ar exceptions
342is used to indicate characters which are an exception to the normal
343beautification rules.
344.It Ar tabexpand
345(bool) Expand tabs to spaces during file transfers; abbreviated
346.Ar tab  ;
347default value is
348.Ar false  .
349Each tab is expanded to 8 spaces.
350.It Ar verbose
351(bool) Verbose mode; abbreviated
352.Ar verb  ;
353default is
354.Ar true  .
355When verbose mode is enabled,
356.Nm tip
357prints messages while dialing, shows the current number
358of lines transferred during a file transfer operations,
359and more.
360.El
361.Sh ENVIRONMENT
362.Nm Tip
363uses the following environment variables:
364.Bl -tag -width Fl
365.It Ev SHELL
366(str) The name of the shell to use for the ~! command; default
367value is ``/bin/sh'', or taken from the environment.
368.It Ev HOME
369(str) The home directory to use for the ~c command; default
370value is taken from the environment.
371.It Ev HOST
372Check for a default host if none specified.
373.El
374.Pp
375The variables
376.Ev ${REMOTE}
377and
378.Ev ${PHONES}
379are also exported.
380.Sh FILES
381.Bl -tag -width /var/spool/uucp/LCK..* -compact
382.It Pa /etc/remote
383Global system descriptions.
384.It Pa /etc/phones
385Global phone number data base.
386.It ${REMOTE}
387Private system descriptions.
388.It ${PHONES}
389Private phone numbers.
390.It ~/.tiprc
391Initialization file.
392.It Pa tip.record
393Record file.
394.It /var/log/aculog
395Line access log.
396.It Pa /var/spool/uucp/LCK..*
397Lock file to avoid conflicts with
398.Xr uucp .
399.El
400.Sh DIAGNOSTICS
401Diagnostics are, hopefully, self explanatory.
402.Sh SEE ALSO
403.Xr remote 5 ,
404.Xr phones 5
405.Sh HISTORY
406The
407.Nm tip
408appeared command in
409.Bx 4.2 .
410.Sh BUGS
411The full set of variables is undocumented and should, probably, be
412paired down.
413