HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

introduction(9) introduction(9)
stty Default At Login Common
Name Character (ASCII Name; Key Names) Redefinition
eof ^D (EOT)
erase # ^H (BS; Backspace)
kill @ ^U (NAK), ˆX
(CAN)
intr ˆ? (DEL; Delete, Rub, Rubout)
^C (ETX)
quit ˆ\ (FS)
start ˆQ
(DC1; X-ON)
stop ˆS (DC3; X-OFF)
The eof character terminates "file" input from the terminal, as read by programs and scripts. By exten-
sion, eof can also terminate the shell (see the Logging Out subsection above).
The
kill character deletes all characters typed before it on a terminal input line. The
erase character
erases the last character typed. Successive uses of
erase will erase characters back to, but not beyond,
the beginning of the input line.
The
intr character generates an interrupt signal that bypasses the input buffer. This signal generally
causes whatever program you are running to terminate. It can be used to stop a long printout that you
don’t want. However, programs can arrange either to ignore this signal altogether, or to be notified when it
happens (instead of being terminated). For example, the vi editor catches interrupts and stops what it is
doing, instead of terminating, so that an interrupt can be used to halt an editing operation without losing
the file being edited.
The quit character generates a quit signal that bypasses the input buffer and most program traps and
causes a running program to terminate. It can cause a core dump in the current directory.
The stop character can be used to pause output to the terminal. It is commonly used on video terminals
to suspend output to the display while you read what is already being displayed. You can then resume out-
put by typing the start character. When stop and start are used to suspend or resume output, they
bypass the keyboard command-line buffer and are not passed to the program. However, any other charac-
ters typed on the keyboard are saved and used as input later in the program.
The eof, erase, and kill characters can be used as normal text characters if you escape them with a
preceding \,asin\ˆD. Therefore, to erase a \, you need two erase
s.
The
intr, quit, start, and stop characters cannot be escaped on the input line.
End-of-Line and Tab Characters
Besides adapting to the speed of the terminal, HP-UX tries to be intelligent as to whether you have a termi-
nal with a newline (line-feed) key, or whether it must be simulated with a return/line-feed character pair.
In the latter case, all incoming return characters are changed to line-feed characters (the standard line del-
imiter), and a return/line-feed pair is echoed to the terminal. If you get into the wrong mode, use the
stty command to correct it (see stty(1)).
Tab characters are used freely in HP-UX source programs. If your terminal does not have the tab function,
you can arrange to have tab characters changed into spaces during output, and echoed as spaces during
input. The stty command sets or resets this mode. By default, the system assumes that tabs are set
every eight character positions. The tabs command (see tabs(1)) can set tab stops on your terminal, if the
terminal supports tabs.
How to Run a Program
When you have successfully logged into HP-UX, the shell monitors input from your terminal. The shell
accepts typed lines from the terminal, splits them into command names and arguments, then executes the
command. The command can be the name of a shell built-in, an executable script of commands, or an exe-
cutable program. There is nothing special about system-provided commands, except that they are kept in
directories where the shell can find them. You can also keep commands in your own directories and
arrange for the shell to find them there.
The command name is the first word on an input line to the shell; the command and its arguments are
separated from one another by blanks (one or more space and/or tab characters).
When a program terminates, the shell ordinarily regains control and prompts you to indicate that it is
ready for another command. The shell has many other capabilities, which are described in detail in the
HP-UX 11i Version 2: December 2007 Update 5 Hewlett-Packard Company 269