Previous Table of Contents Next


CORRECTING TYPING MISTAKES

The UNIX System reads each individual character and temporarily saves or buffers them until you press Return or Line Feed. It then interprets the entire line and performs the requested operation.

The UNIX System performs full duplex input/output (I/O) with your terminal. This means you can type characters in to UNIX while UNIX is displaying information out to your terminal. This will result in a messy, hard-to-read screen, but the data will flow both directions, and the input flow will be interpreted in the correct sequence. You may also type ahead of the UNIX System's ability to read the characters, referred to as UNIX's read-ahead feature. The number of read-ahead characters you may type is limited but usually it is more than you will ever need (256 to 4096).

Default Correction Keys

The @(^U-csh), #(DEL-csh) and \ characters have special meaning to UNIX. The @(^U-csh) character deletes the current input line and is referred to as the line kill character. The #(DEL-csh) erases the last character and is referred to as the erase or backspace character. Multiple #(DEL-csh) erases back to the beginning of the current line. The \ character escapes the meaning of any special character. Therefore \# prints a # and does not perform a backspace.

Resetting Correction Keys

The @(^U-csh) and #(DEL-csh) keys can easily be reset. The standard reset values are Ctrl-X (while pressing and holding the Ctrl key, press the X key) used in place of @, and Ctrl-H (Backspace) used instead of #. Most csh users (who are usually on BSD systems) do not reset the ^U and DEL keys.

1.  Display the current settings that UNIX interprets as special keys on your terminal by typing stty and pressing Return. Notice the erase and kill default settings. Depending on your system administrator, your settings may differ. The output format for stty may differ if you are on a BSD system.
   cj> stty
   speed 38400 baud; -parity cread
   erase = #; kill = @; swtch = ^`;
   -inpck icrnl -ixon onlcr tab3
   echo echoe echok

BSD (Berkeley)
cj> stty everything

2.  Redefine the erase and kill characters by typing stty erase "^h" kill "^x" and pressing Return. The "^" (caret) is typed as Shift-6; do not type Ctrl-H. Notice stty does not display a response.
3.  Display the new settings by typing stty and pressing Return.
   cj> stty
   speed 38400 baud; -parity cread
   erase = ^h; kill = ^x; swtch = ^`;
   -inpck icrnl -ixon onlcr tab3
   echo echoe echok
4.  Type echo Ti#his is a #n example. at your shell prompt and press Return. Use the appropriate erase key (Ctrl-H/Backspace) in place of the # keys. Notice that when you press your Backspace key the cursor moves back one space.
5.  Type echo Another eamxpl@echo Another example and press Return. Use the appropriate line kill key (Ctrl-X) in place of the @ key. Notice that when you press your kill key the cursor jumps to the beginning of the next line; the old line is ignored and a new line of input is read.

BSD (Berkeley)
The new BSD device driver will erase the current line and move your cursor to the beginning of the current line.

6.  Type cat/etc/group and press Return. Be ready to immediately press Ctrl-S to stop the output. The Ctrl-S does not appear on your terminal. To resume scrolling of the output press Ctrl-Q.
7.  If you have I/O problems with your terminal, check the setting with stty and refer to the stty command (Module 126) for valid parameters. Don't hesitate to request help from a knowledgable source about your terminal and the tty device driver. This is usually a difficult part of UNIX to get a handle on.

KNOWING WHICH UNIX YOU ARE USING

To know which type or version of UNIX you are using, use the uname command. Type uname and press Return. If the name of your system is displayed, you are probably on System V UNIX. If the shell returns a message like "uname: command not found," you are probably on a BSD system.

Another check to perform is to type ls/usr/ucb and press Return. If a listing is returned, you are probably on a BSD-type system. If a message like "/usr/ucb not found" is returned, you are probably on a System V system.

These are not guaranteed checks but they are fairly reliable. If both return info then you are on a hybrid SV and BSD system.

KNOWING WHICH SHELL YOU ARE USING

To know which shell you are using, use the ps command.

On System V type ps and press Return.


BSD (Berkeley)
On BSD type ps -u and press Return.

The right-hand column contains the names of the programs currently executing. If one is csh, you are using the C shell; sh is the Bourne shell, and ksh is the Korn shell.

Another alternative is to type echo $0 and press Return. If you are using the sh or ksh, the corresponding string is displayed on your terminal. If you are using the csh, nothing is displayed.


Previous Table of Contents Next