Connects to a remote system.
tip [ -v ] [ - BaudRate ] { SystemName | PhoneNumber }
The tip command connects to a remote system and allows you to work on the remote system as if logged in directly.
Either the SystemName parameter or the PhoneNumber parameter is required. The SystemName parameter specifies the name of a remote system to be contacted. The remote system must be defined in the /etc/remote file, or in the file specified by the REMOTE environment variable. The PhoneNumber parameter specifies the number to dial over a modem connection.
When the tip command is invoked with the SystemName parameter, it searches the remote file for an entry beginning with that system name. When the command is invoked with the PhoneNumber parameter, it searches the remote file for an entry of the form tipBaudRate, where BaudRate is the baud rate for the connection. If the -BaudRate flag is not used, the tip command looks for a tip1200 entry, because 1200 is the default baud rate.
The actions of the tip command can be controlled using flags, escape signals and variables. The tip command reads the /etc/remote file to find out how to contact a remote system and discover the escape-send sequence to use when communicating with that system. In addition, the command may check the /etc/phones file to find out a phone number for the remote system.
A tip user can create an individual remote file in the format of the /usr/lib/remote-file file, and then specify the file to use with the REMOTE environment variable. A user can also create an individual phones file in the format of the /usr/lib/phones-file file, and then specify the file to use with the PHONES environment variable. The tip command does not read the /usr/lib/remote-file file or /usr/lib/phones-file file by default, however. The default files that the tip command uses are the /etc/remote file and /etc/phones file.
A tip user can create a $HOME/.tiprc file to specify initial settings for the tip variables. In addition, settings made in the remote file, the phones file, and the .tiprc file can be overridden by using escape signals while tip is running. Escape signals can also be used, for instance, to start and stop file transfers or interrupt a connection to remote system.
The tip command uses lock files in the /etc/locks directory to lock devices against multiple access and to prevent multiple users from logging in on the same system.
When the tip command prompts for a response, edit the line as you type using the standard keys. Entering ~. (tilde, period) in response to a prompt, or pressing the Interrupt key, will abort the tip dialog and return you to the remote system.
You can use the tip command to transfer files to and from the remote system. You can use tip command escape signals to start and stop the file transfers. Several tip command variables work together to control file transfers.
File transfers usually use tandem mode to control the flow of data. If the remote system does not support tandem mode, set the echocheck variable to on to cause the tip command to synchronize with the remote system after transmitting each character. When transferring files with the ~< and ~> escape signals, use the eofread and eofwrite variables to specify the end of a file when writing, and recognize the end of a file when reading.
If the verbose variable is set on, the tip command performs the following:
You can use scripting to record the conversations you have with the tip command. Use the script variable to start scripting.
-v | Displays the settings of variables as they are read from the .tiprc file. |
-BaudRate | Overrides the default baud rate, which is 1200 baud. |
Using escape signals, you can instruct the tip command to terminate, log off from the remote system, and transfer files. The escape character at the beginning of a line indicates an escape signal. The default escape character is a ~ (tilde). The character can be changed using the escape variable. All other typed characters are transmitted directly to the remote system. The tip command recognizes the following escape signals:
A tip file download will only download the file until one of the EOF characters listed in the eofread command cariable is encountered. If one of these characters is not encountered, then the file copy will not succeed.
When downloading a file with the ~< signal, the user will be prompted for a local file name. The user may respond with any valid writeable file name. When prompted for the remote command, the user should append the EOF character to the end of the file being read.
This signal can be used as shown in the following example:
List command for remote system? echo "\04" | cat /etc/passwd
This example assumes that the character 0x4 is present in the tip eofread variable. The best way of ensuring that this character exists in the variable is to assign it in the usr's .tiprc file, which should reside in the user's home directory.
To accomplish this, the following command can be issued:
echo"eofread=\04" >> ~/.tiprc
~p Source [Dest] | Sends (puts) the Source file to a remote UNIX host system, using the cat command to copy the Source file to the Dest file. If the Dest file name is not specified, the cat command uses the name of the Source file. If the Dest file exists on the remote host, it will be replaced by the Source file. This signal is a UNIX-specific version of the ~> signal. |
~t Source [Dest] | Transfers (takes) the Source file from a remote UNIX host system to the local system, using the cat command to copy the Source file to the Dest file on the local system. If the Dest file name is not specified, the cat command uses the name of the Source file. If the Dest file exists on the local system, it will be replaced by the Source file. This signal is a UNIX-specific version of the ~< signal. |
~| | Pipes the output of a remote command to a local process. The command string sent to the local system is processed by the shell. |
A remote pipe will only succeed if the data from the remote pipe is terminated by one of the eof characters listed in the eofread tip command variable. If one of these characters is not encountered, then the output pipe will not succeed.
When piping remote output with the ~| signal, the user will be prompted for a local command name. The user may respond with any valid command name. When prompted for the remote command, the user should append the EOF character to the end of the file being read.
This signal can be used as shown in the following example:
Local command? cat List command for remote system? echo "asdfasdfasdfasdf\04"
This example assumes that the character 0x4 is present in the tip eofread variable. The best way of ensuring that this character exists in the variable is to assign it in the usr's .tiprc file, which should reside in the user's home directory.
To accomplish this, the following command can be issued:
echo"eofread=\04" >> ~/.tiprc
~$ | Pipes the output of a local process to the remote system. The command string sent to the remote system is processed by the shell. |
~# | Sends a BREAK signal to the remote system. |
~s { Variable=Value | [!]BoolVariable | all | Variable? } | |
Sets or queries the tip command variables.
To change the value of a non-Boolean variable, enter the variable name or abbreviation, followed by an = (equal sign), followed by the new value. For example, type ~s rc=^U to change the character used to turn uppercase conversion on or off (the raisechar variable). To change the value of a Boolean variable, enter the variable name or abbreviation. To reset the variable to its default value, type an ! (exclamation point) in front of the name. For example, type ~s !ec to reset the echocheck variable to its default value. To display all variables readable by the user, specify all as an argument to the ~s signal. You may also request the display of a specific variable by attaching a ? (question mark) to the variable name. For example, type the command ~s eol? to display the current end-of-line string (the eol variable). |
|
~^Z | Stops the tip command. The ~^Z signal is only available with job control. |
~^Y | Stops the local portion of the tip command. The remote portion, which displays the output from the remote system, continues to run. The ~^Y signal is only available with job control. |
~? | Displays a list of the escape signals. |
The tip command uses variables that control its operation. These variables may be numeric, string, character, or Boolean values. Some of these variables can be changed by any user who can run the tip command. However, the following variables can be changed only by a user with root user authority: the baudrate variable and the dialtimeout variable.
Variables may be initialized at run time in the $HOME/.tiprc file. Additionally, you can display and set the variables while already running the tip command by using the ~s escape signal.
Variables may be numeric, string, character, or Boolean values. To set a non-Boolean variable, enter the variable name or abbreviation followed by an = (equal sign) and the value. For example, type either ~s host=zeus or ~s ho=zeus to change the host name to zeus. In the .tiprc file, type host=zeus or ho=zeus.
To change the value of a Boolean variable, enter the variable name or abbreviation as an argument to the ~s signal or on a line of the .tiprc file. To reset the variable to its default value, type an ! (exclamation point) in front of the name. For example, type ~s !echocheck to reset the echocheck variable to its default value while running the tip command.
Following are the common variables, their types, abbreviations, and default values.
tip -300 hera
This instructs the tip command to use baud rate of 300 when contacting remote system hera.
tip 9,343-2132
The tip command connects the local system to the remote system reached by the telephone number 343-2132, after dialing a 9 to reach an outside line.
sc be rec=/home/jimk/callout
then output from the -v flag is as follows:
set script set beautify set record=/home/jimk/callout
/usr/bin/tip | Contains the tip command. |
/etc/locks/* | Contains lock files that prevent multiple uses of devices and multiple calls to systems. |
/etc/remote | Contains system descriptions for the tip command. If the remote variable or the REMOTE environment variable is set, that file is used instead. |
/usr/lib/remote-file | Contains sample remote file. If theremote variable or the RECORD environment variable is set, that file is used instead. |
/etc/phones | Contains the telephone number database for the tip command. If the phones variable or the PHONES environment variable is set, that file is used instead. |
/usr/lib/phones-file | Contains the telephone number database for the tip command. If the phones variable or the PHONES environment variable is set, that file is used instead. |
$HOME/.tiprc | Defines initial settings for the tip command variables. |
tip.record | Contains the tip command scripts. By default, the file is stored in the current directory. The user can change the file name and directory using the record variable. |
The tip Overview for System Management in AIX 5L Version 5.2 System Management Guide: Communications and Networks.