[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gnulib] Re: small suggestion for texi2dvi
From: |
Karl Berry |
Subject: |
[Bug-gnulib] Re: small suggestion for texi2dvi |
Date: |
Fri, 3 Jan 2003 22:25:00 -0500 |
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.
That said, there's no harm in your suggestion of
egrep=${EGREP-egrep}
fgrep=${FGREP-fgrep}
so I'll do that. Thanks.
[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.)
Thanks,
karl
Date: Fri, 3 Jan 2003 18:11:58 +0100
From: Kurt Hornik <address@hidden>
To: Karl Berry <address@hidden>
CC: Kurt Hornik <address@hidden>
Subject: small suggestion for texi2dvi
Karl,
Recent Autoconf docs say that
POSIX 1003.1-2001 no longer requires `egrep', but many older
hosts do not yet support the POSIX replacement `grep -E'.
and now provide two macros AC_PROG_EGREP and AC_PROG_FGREP. Using the
results of these for substitution in texi2dvi is perhaps an overkill,
but perhaps you could use something like
egrep=${EGREP-egrep}
fgrep=${FGREP-fgrep}
and then use $egrep and $fgrep in
echo "$command_line_filename" | egrep '^(/|[A-z]:/)' >/dev/null \
elif sed 1q "$command_line_filename" | fgrep 'input texinfo' >/dev/null; then
if fgrep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then
???
[As an aside, the Autoconf docs also claim that ${VAR:-value} is not
portable and one should use ${VAR-liternal} instead if possible...]
Best
-k
- [Bug-gnulib] Re: small suggestion for texi2dvi,
Karl Berry <=