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

s
sh-posix(1) sh-posix(1)
rather than the last word.
M-_ Same as M-..
M-* Attempt file name generation on the current word.
M-ˆ[ File name completion. (meta-escape.) Replaces the current word with the longest
common prefix of all file names 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 and your erase, kill, and interrupt charac-
ters may 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
The editor starts in insert mode until an escape (ESC) is received. This puts you in control mode in which
you can move the cursor and perform editing commands. A return in either mode sends the line.
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 escape (ESC) character terminates canonical processing for the
remainder of the command and you can then modify the command line. This scheme has the advantages of
canonical processing with the typeahead echoing of raw mode.
Setting the viraw option always disables canonical processing on the terminal. This mode is implicit for
systems that do not support two alternate end-of-line delimiters, and may be helpful for certain terminals.
Insert Edit Commands
By default, the editor is in insert mode.
erase Delete previous inserted character. The erase character is user-definable with the
stty command, usually set to ˆH. The system default is #.
kill Delete all current inserted characters. The kill character is user-definable with the
stty command, usually set to ˆX or ˆU. The system default is @.
\ Escape the next erase or kill character.
^D Terminate the shell.
^V Escape next character. Editing characters and erase or kill characters may be entered
in a command line or in a search string if preceded by a ˆV, which removes the next
characters editing features (if any).
^W Delete the previous blank-separated word.
Motion Edit Commands
These commands move the cursor. The use of count causes a repetition of the command the cited number
of times.
[count]l Cursor forward (right) one character.
[count]w Cursor forward one alphanumeric word.
[count]W Cursor forward to the beginning of the next word that follows a blank.
[count]e Cursor forward to the end of the word.
[count]E Cursor forward to end of the current blank-delimited word.
[count]h Cursor backward (left) one character.
[count]b Cursor backward one word.
[count]B Cursor backward to preceding blank-separated word.
[count]| Cursor to column count. Default is 1.
[count]fc Find the next character c in the current line.
[count]Fc Find the previous character c in the current line.
[count]tc Equivalent to fc followed by h.
[count]Tc Equivalent to Fc followed by l.
[count]; Repeat the last single-character find command, f, F, t,orT.
[count], Reverses the last single character find command.
Section 1914 Hewlett-Packard Company 23 HP-UX 11i Version 1: September 2005