[ On , May 26, 2000 at 17:49:08 (+0200), Jim Meyering wrote: ]
> Subject: Re: expr from sh-utils-2.0 has a very annoying and WRONG warning!
>
> POSIX says this (and SUSv2 has very similar language)
Isn't that what I said too?
> If you can get the standards folks to change that wording,
> I'll be happy to make GNU expr follow suit.
I'm not talking about changing standards, or even just changing GNU
expr's specification -- just get rid of the bloody annoying and
*incorrect* warning.
Portable scripts *MUST* use a leading '^' anchor! I do want the ability
to run my scripts on V7 or 32V or sysIII, (especially since I have a
legal license for the sources now and an emulator that'll run them a
heck of a lot faster than any real PDP11 or VAX11 ever ran!).
Your logic about the warning is backwards. All that really matters are
those useages where the '^' is *NOT* explicit and in those cases you
need to know if the script was written by someone expecting, or rather
requiring, V7 behaviour, or whether it expects POSIX behaviour, before
you warn the user so obviously an automated warning is still not
possible. (If you could do a stat on the script then you could give a
warning iff the script was older than POSIX and/or not from SysV! ;-)
Even if you want everyone to know that the POSIX standard is different
from V7 et al, that's still no reason to put an annoying and overly
verbose warning out every time you spot someone using the antiquated
usage! Just put a big bold warning in the manual and the on-line help
and forget about it!
Note that the "expr (GNU sh-utils) 2.0" online-help does not yet mention
the fact that the REGEXP is implicitly anchored at the string start....
--
Greg A. Woods
+1 416 218-0098 VE3TCP <[EMAIL PROTECTED]> <robohack!woods>
Planix, Inc. <[EMAIL PROTECTED]>; Secrets of the Weird <[EMAIL PROTECTED]>