On Tue, Oct 08, 2002 at 01:25:48PM -0700, Jerry wrote:
> Aha! this may be related to textutils. It looks like
> the solaris tr is different than the gnu util tr. 
> Wow, solaris sucks!
> --- Jerry <[EMAIL PROTECTED]> wrote:
> > But... I did have to fix this in the script:
> > (chg-zd-mtx):
> > 
> > numeric=`echo $whichslot | tr -cd 0-9`
> > to
> > numeric=`echo $whichslot | tr -cd [0-9]` <-- add [ ]

Solaris 8+ /usr/bin/tr is indeed broken, but not in the way you think.
:-)

The appropriate "new" character range syntax for tr(1), which
will work with *either* GNU tr or Solaris 2.6+ /usr/bin/tr is:

    [CHAR1-CHAR2]

The 2.4.3 release notice mentioned that chg-zd-mtx has been re-written,
so hopefully that included handling tr syntax.

If you need the old syntax to work on Solaris you can get it from
/usr/ucb/tr or /usr/xpg4/bin/tr.  I fixed my 2.4.2p2 chg-zd-mtx
my just putting /usr/xpg4/bin first in $PATH.

I agree it's unfortunate that Sun decided to stop grandfathering the
old syntax in /usr/bin/tr, but the man page stopped defining it that
way years and years ago.

-- 
Jay Lessert                               [EMAIL PROTECTED]
Accelerant Networks Inc.                       (voice)1.503.439.3461
Beaverton OR, USA                                (fax)1.503.466.9472

Reply via email to