It is currently Thu, 20 Jan 2022 04:52:44 GMT



 
Author Message
 /usr/xpg4/bin/tr bug (or don't use /usr/xpg4/bin)
Hi

I ran into some problems because I had /usr/xpg4/bin in my path
on Solaris 7 x86.

I was stung by a bug in tr:
$ printf "%s\n" debug | /usr/xpg4/bin/tr a-z A-Z
cdatf

The correct behaviour is:
$ printf "%s\n" debug | /usr/bin/tr a-z A-Z
DEBUG

My locale is:
$ locale
LANG=en_GB.ISO8859-15
LC_CTYPE=en_GB.ISO8859-15
LC_NUMERIC=en_GB.ISO8859-15
LC_TIME=en_GB.ISO8859-15
LC_COLLATE=en_GB.ISO8859-15
LC_MONETARY=en_GB.ISO8859-15
LC_MESSAGES=C
LC_ALL=

I hope this post will help others avoid my mistake!

Nick



 Tue, 17 Jul 2001 03:00:00 GMT   
 /usr/xpg4/bin/tr bug (or don't use /usr/xpg4/bin)

Is this a Solaris 7 only problem?  /usr/xpg4/bin/tr works fine on
Solaris 2.5.1 and 2.6 [Sparc] for me.

Mark
--
remove "beren." from my address to reply



 Tue, 17 Jul 2001 03:00:00 GMT   
 /usr/xpg4/bin/tr bug (or don't use /usr/xpg4/bin)

I tried it at work on a Solaris 2.6 [Sparc] machine which showed the
same problem and a 2.5.1 machine which is OK.
The problem is related to locales.
I am using UK locales with Solaris 7 and Solaris 2.6.1.

The following works on Solaris 7:

bash-2.02$ export LC_COLLATE=C
bash-2.02$ echo debug |/usr/xpg4/bin/tr a-z A-Z
DEBUG

Nick



 Tue, 17 Jul 2001 03:00:00 GMT   
 /usr/xpg4/bin/tr bug (or don't use /usr/xpg4/bin)
[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]

It appears to be a locale problem.

Casper
--
Expressed in this posting are my opinions.  They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.



 Tue, 17 Jul 2001 03:00:00 GMT   
 
   [ 5 post ] 

Similar Threads

1. /usr/bin/ls and /usr/xpg4/bin/ls report different file attributes

2. /bin/ksh vs /usr/xpg4/bin/sh

3. What's in /usr/xpg4/bin ?

4. line limit in /usr/xpg4/bin/grep

5. /usr/xpg4/bin/more show garbage when reading DOS-style files

6. gnu vs xpg4 vs ucb vs /usr/bin

7. crash in /usr/xpg4/bin/sed in SunOS5.7

8. Solaris 8 /usr/xpg4/bin/vi broken?

9. FMLI/FACE and /usr/xpg4/bin

10. Solaris /usr/xpg4/bin/awk patch


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software