# [texhax] Low-level TeX question: string substitution macro

Uwe Lück uwe.lueck at web.de
Wed Apr 22 22:22:30 CEST 2009

```The line number feature ...

>Date: Wed, 22 Apr 2009 20:48:29 +0200
>To: Toby Cubitt <tsc25 at cantab.net>
>From: Uwe Lück <uwe.lueck at web.de>
>
>>Sed can easily accommodate this using line-number rule addresses. Never
>>having used them, I have no idea how easy it would be to do using fifinddo
>>or other (La)TeX string substitution packages.
>
>fifinddo provides the same functionality, see section 5.2, pp. 15f. of
>
>     http://mirror.ctan.org/macros/latex/contrib/nicetext/fifinddo.pdf

I have also used it for debugging, setting \tracingmacros=1 at a certain
line and =0 at the next one or so. This is another point on: Using TeX for
filtering is only partially string substitution. I don't say that awk etc.
can be replaced by a TeX algorithm for string substitution. Rather: TeX
offers so much to replace other software. And for this is it doesn't
suffice to choose among string handling packages. You need *file* handling
as well. file-find-do!

TeX Forever!

Uwe.