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