HP-UX Reference (11i v3 07/02) - 1 User Commands N-Z (vol 2)

s
sed(1) sed(1)
(2) t label Test. Branch to the
: command bearing the label if any substitutions have been made since
the most recent reading of an input line or execution of a
t.Iflabel is empty, branch to the
end of the script.
(2)
w wfile Write. Append the pattern space to wfile.
(2)
x Exchange the contents of the pattern and hold spaces.
(2) y/string1/string2/
Transform. Replace all occurrences of characters in string1 with the corresponding character
in string2. The lengths of string1 and string2 must be equal.
Any character other than backslash or newline can be used instead of slash to delimit the two
strings.
If a backslash character is immediately followed by another backslash character in string1 or
string2, the two backslash characters will be handled as a single literal backslash character.
The delimiter itself can be used as a literal character in string1 and string2 if it is preceded by
a backslash. The only exception is character "n" as the delimiter, because backslash-n, "\n",
will be interpreted as a newline.
The meaning of a backslash is undefined if it is followed by any character that is not "n", a
backslash, or the delimiter character.
(2)
! function
Don’t. Apply the function (or group, if function is { ) only to lines not selected by the address
or addresses.
(0)
: label This command does nothing; it bears a label for b and t commands to branch to.
(1)
= Place the current line number on the standard output as a line.
(2) { Execute the following commands through a matching } only when the pattern space is
selected. The syntax is:
{ cmd1
cmd2
cmd3
.
.
.
}
(0) An empty command is ignored.
(0) # If a # appears as the first character on the first line of a script file, that entire line is treated
as a comment with one exception: If the character after the # is an n, the default output is
suppressed. The rest of the line after
#n is also ignored. A script file must contain at least
one non-comment line.
EXTERNAL INFLUENCES
For information about the UNIX Standard environment, see standards(5).
Environment Variables
LANG provides a default value for the internationalization variables that are unset or null. If LANG
is unset
or null, the default value of "C" (see lang(5)) is used. If any of the internationalization variables contains an
invalid setting,
sed will behave as if all internationalization variables are set to "C". See environ(5).
LC_ALL If set to a non-empty string value, overrides the values of all the other internationalization vari-
ables.
LC_CTYPE determines the interpretation of text as single and/or multi-byte characters, the classification
of characters as printable, and the characters matched by character class expressions in regular expres-
sions.
LC_MESSAGES determines the locale that should be used to affect the format and contents of diagnostic
messages written to standard error and informative messages written to standard output.
NLSPATH determines the location of message catalogues for the processing of LC_MESSAGES .
HP-UX 11i Version 3: February 2007 3 Hewlett-Packard Company 233