HP-UX Reference (11i v2 07/12) - 1 User Commands N-Z (vol 2)
s
sh-posix(1) sh-posix(1)
[count]P Insert the previous text modification before the cursor.
[count]p Insert the previous text modification after the cursor.
R Enter insert mode and replace characters on the screen with characters you type,
overlay fashion.
[count]rc Replace the current character with c.
[count]
x Delete the current character.
[count]X Delete the preceding character.
[count]. Repeat the previous text modification command.
~ Invert the case of the current character and advance the cursor.
[count]_ Append the count word of the previous command at the current cursor location and
enter insert mode at the end of the appended text. The last word is used if count is
omitted.
* Append an * to the current word and attempt file name generation. If no match is
found, ring the bell. If a match is found, replace the word with the matching string of
file names and enter insert mode.
escape
\ Attempt file name completion on the current word. Replace the current word with
the longest common prefix of all file names matching the current word with an aster-
isk appended. If the match is unique, append a / if the file is a directory or append a
space if the file is not a directory.
Other Edit Commands
[count]ymotion
y[count]motion
Yank current character through character that motion would move the cursor to and
put them into the delete buffer. The text and cursor are unchanged.
Y Yank from current position to end of line. Equivalent to y$.
u Undo the last text-modifying command.
U Undo all the text-modifying commands performed on the line.
[count]v Execute the command fc -e ${VISUAL:-${EDITOR:-vi}}
count in the input
buffer. If count is omitted, the current line is used. This executes an editor with the
current line as the input "file". When you exit from the editor, the result is executed.
^L Line feed and print current line.
^J Execute the current line, regardless of mode (newline).
^M Execute the current line, regardless of mode (return).
# Insert a # at the beginning of the current line and after each embedded newline, and
execute the line. Useful for inserting the current command line in the history list
without executing it.
= List the file names that match the current word if an asterisk were appended to it.
@letter Search your alias list for an alias with the name _letter (underscore letter). If an alias
of this name is defined, its value is executed as a command sequence on the current
line. This provides a simple macro capability.
EXTERNAL INFLUENCES
Environment Variables
LC_COLLATE determines the collating sequence used in evaluating pattern matching notation for file
name generation. If it is not defined or is empty, it defaults to the value of LANG.
LC_CTYPE determines the classification of characters as letters, and the characters matched by character
class expressions in pattern matching notation. If it is not defined or is empty, it defaults to the value of
LANG.
If LANG is not defined or is empty, it defaults to C (see lang(5)).
If any internationalization variable contains an invalid value, they all default to C (see environ(5)).
International Code Set Support
Single- and multibyte character code sets are supported.
RETURN VALUE
Errors detected by the shell, such as syntax errors, cause the shell to return a nonzero exit status. Other-
wise, the shell returns the exit status of the last command executed. See also the
exit special command.
HP-UX 11i Version 2: December 2007 Update − 25 − Hewlett-Packard Company 289