HP-UX Reference (11i v1 05/09) - 1 User Commands N-Z (vol 2)

s
sh-posix(1) sh-posix(1)
^F Move cursor forward (right) one character.
M-f Move cursor forward one word. (The editor’s idea of a word is a string of characters
consisting of only letters, digits and underscores.)
^B Move cursor backward (left) one character.
M-b Move cursor backward one word.
^A Move cursor to start of line.
^E Move cursor to end of line.
^]char Move cursor forward to character char on current line.
M-ˆ]char Move cursor backward to character char on current line.
^XˆX Interchange the cursor and mark.
erase Delete previous character. (User-defined erase character as defined by the
stty
command, usually ˆH or #.)
^D Delete current character.
eof Terminate the shell if the current line is null. (User-defined end-of-file character as
defined by the stty command, usually
ˆD.)
M-d Delete current word.
M-ˆH Delete previous word. (meta-backspace)
M-h Delete previous word.
M-ˆ? Delete previous word. (meta-delete) If your interrupt character is
ˆ? (DEL, the
default), this command will not work.
^T In emacs mode, transpose current character with next character. In gmacs mode,
transpose two previous characters.
^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, then delete from the given posi-
tion up to the cursor. If preceded by a numerical parameter whose value is greater
than the current cursor position, then delete 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 Kill the entire current line. If two kill characters are entered in succession, all subse-
quent consecutive kill characters cause a line feed (useful when using paper termi-
nals). (User-defined kill character as defined by the stty command, usually ˆX
or
@.)
^Y Restore last item removed from line. (Yank item back to the line.)
^L Line feed and print current line.
^@ Set mark. (null character)
M- Set mark. (meta-space)
^J Execute the current line. (newline)
^M Execute the current line. (return)
^P Fetch previous command. Each time ˆP is entered, the 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.Ifaparameter
of zero is given, the search is forward. string is terminated by a return or newline. If
string is preceded by a ˆ, the matched line must begin with string.Ifstring is omit-
ted, 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 Execute the current line and fetch the next line relative to current line from the his-
tory file.
M-digits Define a numeric parameter. The digits are taken as a parameter to the next com-
mand. The commands that accept a parameter are erase, ˆB, ˆC, ˆD, ˆF, ˆK, ˆN,
^P, ˆR, ˆ], M-ˆH, M-., M-_, M-b, M-c, M-d, M-f, M-h, and M-l.
M-letter Your alias list is searched for an alias by the name _letter (underscore-letter). 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 metafunctions.
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
HP-UX 11i Version 1: September 2005 22 Hewlett-Packard Company Section 1913