Element: <replace>

Syntax


<!ELEMENT replace        (#PCDATA)>

This element occurs in the element search_replace.

Description

The element replace allows to specify the replacement string in a search and replace operation.

Examples


<search_replace
    base = "/usr/src/mypackage">
    <file>runit.sh</file>
    <find>BINDIR</find>
    <replace>/bin</replace>
</search_replace>

The equivalent bash script is :


echo Performing substitution in runit.sh
cd /usr/src/mypackage
cp runit.sh /tmp/foo.$$
sed -e 's/BINDIR/\/bin/' /tmp/foo.$$ > runit.sh