Open main menu

Linux and Unix Users Group at Virginia Teck Wiki β

Changes

Sed

9 bytes added, 02:53, 24 December 2009
Substitution
=Uses=
==Substitution==
The most popular command of sed is the <code>s</code> command for substitution. To use the command, type an s , followed by a delimiting character , followed by a regular expression to find look for, followed by the delimiting character , followed by an expression with which to replace what was found , followed by a final delimiting character. (<code>/</code> is the conventional delimiting character and potentially required by some versions of sed. GNU sed can take any character however, and when URLs or paths are involved, <code>%</code> is often a handy choice to lessen the amount of escaping required.)
<pre>
$ echo "Never let schooling interfere with your education." | sed 's/schooling/video games/'
Anonymous user