On Tue, Oct 08, 2002 at 02:11:52PM -0700, Jay Lessert wrote: > > 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.
You have the history reversed. The AT&T tr always used square brackets for ranges. Omitting them was a BSDism. As you say, the BSD or posix- compliant versions in /usr/ucb and /usr/xpg4/bin support the NEW syntax as does /opt/sfw/bin/gtr if the companion cd is installed. -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road (609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)
