[gpm]GPM doc problems with other awk's? (was: RE: getting the one true AWK)

Jason Gurtz jason@tommyk.com
Thu, 6 Dec 2001 12:08:28 -0500


I think this doc problem also applys to mawk as well as the one true awk
@ http://cm.bell-labs.com/cm/cs/awkbook/index.html

~Jason

--

> Dave Anselmi wrote:
>
> > Gerard Beekmans wrote:
> >
> > I agree. I would rather send a patch to the gpm guys to be
> > able to build the docs with any kind of awk, and not just
> > gawk.
>
> Well, if I had figured it out I'd have made a patch.  The
> problem is there's
> an awk script that uses gensub() which is gawk specific.
> gensub() is like
> the s operator in perl, sed, and ed - it substitutes
> something for a matched
> pattern.  The thing that the awk/mawk gsub() doesn't do is
> allow \N (N is a
> number) to allow pieces of the matched pattern to be used in the
> replacement.
>
> In gpm, they use gensub() to turn something like @file{mc-0.11} into
> \\fbmc-0.11\\fi.  With sed, that's easy.  Without gensub() in
> awk, I don't
> know.  I tried running the file through sed first, or taking
> out the bad
> line of awk and other things, but by the time the man page was made
> everything was hosed.
>
> So if anyone knows how to do this, I'd like to know.
>
> Dave
>
> P.S. In sed you use something like:
>
> s,@file\{\([^}]+\)\},\\\\fb\1\\\\fi,g
>
>
> --
> Unsubscribe: send email to listar@linuxfromscratch.org
> and put 'unsubscribe lfs-dev' in the subject header of the message
>