Use this process from a Unix shell or from a DOS prompt: sed -nf blockrep.sed findrep.txt >custom.sed sed -f custom.sed input.file >output.file erase custom.sed The generic script «blockrep.sed» follows below. It’s fairly long. That should be central to everything we talk about out there in the market. They didn’t like them, they didn’t admire them, they didn’t respect them, they didn’t use them. However, recursion is used to handle subpatterns and indefinite repetition. How sed Works sed maintains two data buffers: the active pattern space, and the auxiliary hold space.