<= back to main index


rlr - replace line range

Last modified: Apr 11 09:19

Overview

rlr replaces a range of lines in a file with data from another file or stdin. The range is delimited by a pair of distinctive lines, typically specially formatted comment lines in the file to be edited.

For example, the main index for this css package is maintained with this incantation:

        mkpodindex -k -l hrefs \
        | rlr -f '<!--BEGIN AUTOPODINDEX-->' \
              -t '<!--END AUTOPODINDEX-->' \
              -i index.html -o index.html -

that places the output of mkpodindex into the middle of the index.html file.