sed.1 (2010 09)

s
sed(1) sed(1)
NLSPATH determines the location of message catalogues for the processing of
LC_MESSAGES.
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
Make a simple substitution in a file from the command line or from a shell script, changing
abc to xyz:
sed ’s/abc/xyz/’ file1 >file1.out
Same as above but use shell or environment variables
var1 and var2 in search and replacement
strings:
sed "s/$var1/$var2/" file1 >file1.out
or
sed ’s/’$var1’/’$var2’/’ file1 >file1.out
Multiple substitutions in a single command:
sed -e ’s/abc/xyz/’ -e ’s/lmn/rst/’ file1 >file1.out
or
sed -e ’s/abc/xyz/’ \
-e ’s/lmn/rst/’ \
file1 >file1.out
WARNINGS
sed limits command scripts to a total of not more than 100 commands.
The hold space is limited to 8192 characters.
sed processes only text files. See the glossary for a definition of text files and their limitations.
AUTHOR
sed was developed by OSF and HP.
SEE ALSO
awk(1), ed(1), grep(1), environ(5), lang(5), regexp(5), standards(5).
sed: A Non-Interactive Streaming Editor tutorial in the Text Processing Users Guide.
STANDARDS CONFORMANCE
sed: SVID2, SVID3, XPG2, XPG3, XPG4, POSIX.2
4 Hewlett-Packard Company 4 HP-UX 11i Version 3: September 2010