| www.delorie.com/gnu/docs/sed/sed_12.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Until this chapter, we have only encountered escapes of the form
`\^', which tell sed not to interpret the caret
as a special character, but rather to take it literally. For
example, `\*' matches a single asterisk rather than zero
or more backslashes.
This chapter introduces another kind of escape(5)---that
is, escapes that are applied to a character or sequence of characters
that ordinarily are taken literally, and that sed replaces
with a special character. This provides a way
of encoding non-printable characters in patterns in a visible manner.
There is no restriction on the appearance of non-printing characters
in a sed script but when a script is being prepared in the
shell or by text editing, it is usually easier to use one of
the following escape sequences than the binary character it
represents:
The list of these escapes is:
\a
\f
\n
\r
\t
\v
\cx
\dxxx
\oxxx
\xxx
`\b' (backspace) was omitted because of the conflict with the existing "word boundary" meaning.
Other escapes match particular character class and are only valid in regular expressions:
\s
\S
\w
\W
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |