tr [:upper:] [:lower:] | tr -d [:blank:] yields Bad string in SunOS 5.10 (Solaris 10)
the work-around is: tr [A-Z] [a-z] | tr -d ' '
Hello,
Can you please provide me your output of 'uname -a' and locale?
I think this is a locale relating problem as the tr works fine on my Solaris 5.10 with C environment.
Looking forward for your reply. Christian
output of our 'uname -a': SunOS sun1 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Blade-1000
and our locale: LANG= LC_CTYPE=en_NZ.UTF-8 LC_NUMERIC=en_NZ.UTF-8 LC_TIME="C" LC_COLLATE=en_NZ.UTF-8 LC_MONETARY=en_NZ.UTF-8 LC_MESSAGES=en_NZ.UTF-8 LC_ALL=
/usr/bin/tr fails with Bad string error, but /usr/xpg4/bin/tr works
Phil,
Thank you for your reply. Running the script on Solaris within a non singlebyte locale causes the error you described.
I changed the shell script according to your workaround. The changes will be part of the 3.4.0 release.
Thank you very much, Christian
Log in to post a comment.
Hello,
Can you please provide me your output of 'uname -a' and locale?
I think this is a locale relating problem as the tr works fine on my Solaris 5.10 with C environment.
Looking forward for your reply.
Christian
output of our 'uname -a':
SunOS sun1 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Blade-1000
and our locale:
LANG=
LC_CTYPE=en_NZ.UTF-8
LC_NUMERIC=en_NZ.UTF-8
LC_TIME="C"
LC_COLLATE=en_NZ.UTF-8
LC_MONETARY=en_NZ.UTF-8
LC_MESSAGES=en_NZ.UTF-8
LC_ALL=
/usr/bin/tr fails with Bad string error, but /usr/xpg4/bin/tr works
Phil,
Thank you for your reply.
Running the script on Solaris within a non singlebyte locale causes the error you described.
I changed the shell script according to your workaround. The changes will be part of the 3.4.0 release.
Thank you very much,
Christian