[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] Re: small suggestion for texi2dvi

From: Aharon Robbins
Subject: [Bug-gnulib] Re: small suggestion for texi2dvi
Date: Mon, 6 Jan 2003 09:45:33 +0200

> Date: Fri, 3 Jan 2003 22:25:00 -0500
> From: address@hidden (Karl Berry)
> To: address@hidden
> CC: address@hidden, address@hidden, address@hidden
> Subject: Re: small suggestion for texi2dvi
> Hi Kurt,
>             POSIX 1003.1-2001 no longer requires `egrep', but many older
>          hosts do not yet support the POSIX replacement `grep -E'.
> Yeah.  This is one of the things that I find unfathomable about recent
> POSIX.  How can they possibly no longer require egrep and fgrep?  They
> have been used in zillions of scripts for 25+ years.  I don't wish to
> cater to their (IMHO) stupidity.

They're trying to unify things to only one grep.  However, the current
standard, in the XSI part (the X/Open extensions) does require fgrep and
egrep, so it's pretty safe to rely on them, IMHO.

> That said, there's no harm in your suggestion of
>       egrep=${EGREP-egrep}
>       fgrep=${FGREP-fgrep}
> so I'll do that.  Thanks.

Extra insurance never hurts.

Hmmm, will this do what you what?  Autoconf's AC_PROG macros only set those
variables for the configure script.  What's going to set them in texi2dvi?
Or am I missing something?

>     [As an aside, the Autoconf docs also claim that ${VAR:-value} is not
>     portable and one should use ${VAR-liternal} instead if possible...]
> Yes.  Interestingly, it was an Autoconf maintainer (Akim) who put in a
> number of those ${VAR:-value} expressions :).  I'm not sure if there's a
> deep reason behind it.  (I kind of doubt it.)  Akim?  (Hey, and welcome
> back.)

The forms with the : are indeed not maximally portable; they're not in the
V7 Bourne shell which was used in BSD releases up to and including 4.3 BSD.
Thus, IFF one is worried about such aging systems, one shouldn't use the :
forms.  The : forms were introduced, IIRC, in the System III /bin/sh, circa
1980, which also added CDPATH to the Bourne shell.  Since they're well over
20 years old now, it's probably safe to use them. (:-)

This moment of Unix trivia brought to you by,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]