TIP(1C) — USER COMMANDS
NAME
tip, cu − connect to a remote system
SYNOPSIS
tip [ −v ] [ −speed ] system-name
tip [ −v [ −speed_entry ] [ phone-number ]
cu phone-number [ −t ] [ −s speed ] [ −a acu ] [ −l line ] [ −# ]
DESCRIPTION
tip and cu establish a full-duplex connection to another machine, giving the appearance of being logged in directly on the remote computer. It goes without saying that you must have a account on the machine (or equivalent) to which you wish to connect. The preferred interface is tip. The cu interface is included for those people attached to the ‘call UNIX’ command of the version 7 UNIX system. This manual page describes only tip.
When tip starts up it reads commands from the file .tiprc in your home directory. If you use the −v option on the tip command line, tip displays these commands as it executes them. See the discussion on variables later on.
Typed characters are normally transmitted directly to the remote machine (which does the echoing as well).
A tilde (‘~’) appearing as the first character of a line is an escape signal which directs tip to perform some special action. tip recognizes the following escape sequences:
~^D ~.
Drop the connection and exit (you may still be logged in on the remote machine).
~c [name]
Change directory to name (no argument implies change to your home directory).
~! Escape to a shell (exiting the shell returns you to tip).
~> Copy file from local to remote.
~< Copy file from remote to local.
~p from [ to ]
Send a file to a remote UNIX host. When you use the put command, the remote UNIX system runs the command string
cat > to
while tip sends it the from file. If the to file isn’t specified, the from file name is used. This command is actually a UNIX specific version of the ‘~>’ command.
~t from [ to ]
Take a file from a remote UNIX host. As in the put command the to file defaults to the from file name if it isn’t specified. The remote host executes the command string
cat > from; echo ^A
to send the file to tip.
~| Pipe the output from a remote command to a local UNIX process. The command string sent to the local UNIX system is processed by the shell.
~C Connect a program to the remote machine. The command string sent to the program is processed by the shell. The program inherits file descriptors 0 as remote line input, 1 as remote line output, and 2 as tty standard error.
~# Send a BREAK to the remote system. For systems which don’t support the necessary ioctl call the break is simulated by a sequence of line speed changes and DEL characters.
~s Set a variable (see the discussion below).
~^Z Stop tip (only available when run under the C-Shell).
~? Get a summary of the tilde escapes
Copying files requires some cooperation on the part of the remote host. When a ~> or ~< escape is used to send a file, tip prompts for a file name (to be transmitted or received) and a command to be sent to the remote system, in case the file is being transferred from the remote system. The default end of transmission string for transferring a file from the local system to the remote is specified as the ‘oe’ parameter in the remote(5) file, but may be changed by the set command. While tip is transferring a file the number of lines transferred will be continuously displayed on the screen. A file transfer may be aborted with an interrupt. An example of the dialogue used to transfer files is given below (input typed by the user is shown in bold face).
arpa% tip monet
[connected]
...(assume we are talking to another UNIX system)...
ucbmonet login: sam
Password:
monet% cat > sylvester.c
~> Filename: sylvester.c
32 lines transferred in 1 minute 3 seconds
monet%
monet% ~< Filename: reply.c
List command for remote host: cat reply.c
65 lines transferred in 2 minutes
monet%
...(or, equivalently)...
monet% ~p sylvester.c
...(actually echoes as ~[put] sylvester.c)...
32 lines transferred in 1 minute 3 seconds
monet%
monet% ~t reply.c
...(actually echoes as ~[take] reply.c)...
65 lines transferred in 2 minutes
monet%
...(to print a file locally)...
monet% ~|Local command: pr -h sylvester.c | lpr
List command for remote host: cat sylvester.c
monet% ~^D
[EOT]
...(back on the local system)...
The remote(5) file contains the definitions for remote systems known by tip; refer to the remote manual page for a full description. Each system has a default baud rate with which to establish a connection. If this value is not suitable, the baud rate to be used may be specified on the command line, for example:
tip −300 mds
When a phone number is specified, instead of a system name, tip looks for an entry in /etc/remote of the form tipspeed_entry. When it finds such an entry, it sets the connection-speed accordingly. If it doesn’t find a corresponding entry, tip interprets speed_entry as if it were a system name, resulting in an error message. If you omit −speed_entry, tip uses the tip0 entry to set a speed for the connection.
When tip establishes a connection it sends out a connection message to the remote system. The default value for this string may be found in the remote file.
At any time that tip prompts for an argument (for example, during setup of a file transfer) the line typed may be edited with the standard erase and kill characters. A null line in response to a prompt, or an interrupt, aborts the dialogue and returns you to the remote machine.
When tip attempts to connect to a remote system, it opens the associated device with an exclusive-open ioctl(2) call. Thus only one user at a time may access a device. This is to prevent multiple processes from sampling the terminal line. In addition, tip honors the locking protocol used by uucp(1C).
AUTO-CALL UNITS
tip may be used to dial up remote systems using a number of auto-call unit’s (ACU’s). When the remote system description contains the ‘du’ attribute, tip uses the call-unit (‘cu’), ACU type (‘at’), and phone numbers (‘pn’) supplied. Normally tip displays verbose messages as it dials. See remote(5) for details of the remote host specification.
Depending on the type of auto-dialer being used to establish a connection the remote host may have garbage characters sent to it upon connection. The user should never assume that the first characters typed to the foreign host are the first ones presented to it. The recommended practice is to immediately type a ‘kill’ character upon establishing a connection (most UNIX systems support ‘@’ as the initial kill character).
tip currently supports the Ventel MD-212+ modem and DC Hayes-compatible modems.
REMOTE HOST DESCRIPTIONS
Descriptions of remote hosts are normally located in the system-wide file /etc/remote. However, a user may maintain personal description files (and phone numbers) by defining and exporting the REMOTE shell variable. The remote file must be readable by tip, but a secondary file describing phone numbers may be maintained readable only by the user. This secondary phone number file is /etc/phones, unless the shell variable PHONES is defined and exported. As described in remote(5), the phones file is read when the host description’s phone number(s) capability is an ‘@’. The phone number file contains lines of the form:
system-name phone-number Each phone number found for a system is tried until either a connection is established, or an end of file is reached. Phone numbers are constructed from ‘0123456789-=∗’, where the ‘=’ and ‘∗’ are used to indicate a second dial tone should be waited for (ACU dependent).
TIP INTERNAL VARIABLES
tip maintains a set of variables which are used in normal operation. Some of these variables are read-only to normal users (root is allowed to change anything of interest). Variables may be displayed and set through the ‘~s’ escape. The syntax for variables is patterned after vi and mail. Supplying ‘all’ as an argument to the set command displays all variables that the user can read. Alternatively, the user may request display of a particular variable by attaching a ‘?’ to the end. For example ‘escape?’ displays the current escape character.
Variables are numeric, string, character, or Boolean values. Boolean variables are set merely by specifying their name. They may be reset by prepending a ‘!’ to the name. Other variable types are set by appending an ‘=’ and the value. The entire assignment must not have any blanks in it. A single set command may be used to interrogate as well as set a number of variables.
Variables may be initialized at run time by placing set commands (without the ‘~s’ prefix) in a .tiprc file in one’s home directory. The −v option makes tip display the sets as they are made. Comments preceded by a ‘#’ sign can appear in the .tiprc file.
Finally, the variable names must either be completely specified or an abbreviation may be given. The following list details those variables known to tip, their abbreviations (surrounded by brackets), and their default values. Those variables initialized from the remote file are marked with a ‘∗’. A mode is given for each variable — capitalization indicates the read or write capability is given only to the super-user.
VariableTypeModeDefault Description
[be]autifyboolrwtruediscard unprintables when scripting
[ba]udratenumrW∗connection baud rate
[c]har[delay]numrw0character delay for file transfers to remote (cl)
[dial]timeoutnumrW60timeout (seconds) when establishing connection
[di]sconnectstrrw""string to send to disconnect (di)
[ec]hocheckboolrwfalse
[eofr]eadstrrw∗char’s signifying EOT from the remote host
[eofw]ritestrrw∗string sent for EOT
[eol] strrw∗end of line indicators
[es]capecharrw‘~’command prefix character
[et]imeoutnumrw10echo check timeout (et)
[ex]ceptionsstrrw"\t\n\f\b"char’s not discarded due to beautification
[fo]rce charrw’^?’force character (default ASCII 255)
[fr]amesizenumrw∗size of buffering between writes on reception
[h]alf[d]uple[x]boolrwfalsehost is half duplex — do local echo (hd)
[ho]st strr∗name of host connected to
[l]ine[delay] numrw0line delay for transfers to remote (dl)
[l]ocal[e]choboolrwfalsesynonym for halfduplex
[par]itystrrw"none"parity to be generated (pa)
[phones]strr"/etc/phones"file for hidden phone numbers
[pr]omptcharrW‘\n’end of line indicator set by host
[ra]ise boolrwfalseupper case mapping switch
[r]aise[c]harcharrw’^?’interactive toggle for raise (default ASCII 255)
[raw]ftpboolrwfalsesend all characters during file transfer (rw)
do not filter non-printable characters
do not do translations like \n to \r.
[rec]ordstrrw"tip.record"name of script output file
[remote]strr"/etc/remote"system description file
[sc]riptboolrwfalsesession scripting switch
[tab]expandboolrwfalseexpand tabs during file transfers
[ta]ndemboolrwtrueuse XON/XOFF flow control (ta and nt)
[verb]oseboolrwtruemake noise during file transfers
[SHELL] strrw"/bin/sh"name of shell for ~! escape
[HOME] strrw""home directory for ~c escape
ENVIRONMENT VARIABLES
The following variables are read from the environment:
REMOTE The location of the remote file.
PHONES The location of the file containing private phone numbers.
HOST A default host to connect to.
HOME One’s log-in directory (for chdirs).
SHELL The shell to fork on a ‘~!’ escape.
FILES
~/.tiprcinitialization file.
/usr/spool/uucp/LCK..∗lock file to avoid conflicts with
/usr/adm/aculog uucp
DIAGNOSTICS
Diagnostics are, hopefully, self explanatory.
SEE ALSO
BUGS
Note that chardelay and linedelay are currently not implemented.
Sun Release 3.2 — Last change: 25 November 1985