HP-UX Reference (11i v1 05/09) - 1 User Commands A-M (vol 1)
k
ksh(1) ksh(1)
ˆC Capitalize current character.
M-c Capitalize current word.
M-l Change the current word to lowercase.
ˆK Delete from the cursor to the end of the line. If preceded by a numerical parameter whose
value is less that the current cursor position, delete from the given position up to the cur-
sor. If preceded by a numerical parameter whose value is greater than the current cursor
position, from the cursor up to the given position.
ˆW Kill from the cursor to the mark.
M-p Push the region from the cursor to the mark on the stack.
kill (User-defined kill character, as defined by the stty(1) command, usually
ˆG or @.) Kill the
entire current line. If two kill characters are entered in succession, all subsequent consecu-
tive kill characters cause a line feed (useful when using paper terminals).
ˆY Restore last item removed from line (yank item back to the line).
ˆL Line feed and print current line.
ˆ@ (Null character) Set mark.
M-space (Meta space) Set mark.
ˆJ (New line) Execute the current line.
ˆM (Return) Execute the current line.
ˆP Fetch previous command. Each time ˆP is entered, the next previous command in the his-
tory list is accessed.
ˆN Fetch next command. Each time ˆN is entered the next command in the history list is
accessed.
M-< Fetch the least recent (oldest) history line.
M-> Fetch the most recent (youngest) history line.
ˆRstring Reverse search history for a previous command line containing string. If a parameter of
zero is given, the search is forward. string is terminated by a Return or New-Line. If
string is preceded by a ˆ, the matched line must begin with string.Ifstring is omitted, the
next command line containing the most recent string is accessed. In this case a parameter
of zero reverses the direction of the search.
ˆO Operate - Execute the current line and fetch from the history file the next line relative to
current line.
M-digits (Escape) Define numeric parameter, the digits are taken as a parameter to the next com-
mand. The commands that accept a parameter are ˆF, ˆB, erase, ˆC,
ˆD, ˆK, ˆR, ˆP, ˆN,
^], M-., M-_, M-b, M-c, M-d,
M-f, M-h, M-l and M-ˆH.
M-letter Softkey. User’s alias list is searched for an alias by the name
_letter and if an alias of this
name is defined, its value is inserted on the input queue. This letter must not be one of the
above meta-functions.
M-
. The last word of the previous command is inserted on the line. If preceded by a numeric
parameter, the value of this parameter determines which word to insert rather than the
last word.
M-_ Same as M-..
M-* Attempt file-name generation on the current word.
M-ESC File-name completion. Replaces the current word with the longest common prefix of all
filenames matching the current word with an asterisk appended. If the match is unique, a
/ is appended if the file is a directory and a space is appended if the file is not a directory.
M-= List files matching current word pattern as if an asterisk were appended.
ˆU Multiply parameter of next command by 4.
\ Escape next character. Editing characters, the user’s erase, kill and interrupt (normally
^?) characters can be entered in a command line or in a search string if preceded by a \.
The \ removes the next character’s editing features (if any).
ˆV Display version of the shell.
M-# Insert a # at the beginning of the line and execute it. This causes a comment to be
inserted in the history file.
Vi Editing Mode
There are two typing modes. Entering a command puts you into input mode. To edit, the user enters
control mode by pressing ESC and moves the cursor to the point needing correction, then inserts or
deletes characters or words. Most control commands accept an optional repeat count prior to the command.
In vi mode on most systems, canonical processing is initially enabled and the command is echoed again if
the speed is 1200 baud or greater and contains any control characters, or if less than one second has
elapsed since the prompt was printed. The ESC character terminates canonical processing for the
remainder of the command and the user can then modify the command line. This scheme has the
Section 1−−428 Hewlett-Packard Company − 19 − HP-UX 11i Version 1: September 2005