Problem
In earlier releases of SCO UNIX Operating System you could use the command:
cat file1 | tr '[A-Z]' '[a-z]' > file2to translate the characters in file1 from upper case to lower case and write the output to file2. This syntax does not work anymore.
How can I translate between cases in SCO OpenServer Release 5?
Cause
The tr(C) command has been changed to comply with:
ISO/IEC DIS 9945-2:1992/POSIX 1003.2 X/Open CAE Specification, Commands and Utilities, Issue 4, 1992
a-z and A-Z are no longer reliable as SCO OpenServer now supports character sets where the characters a and b may not be adjacent.
See locale(M) for further details on how to select a character
set using the LANG environment variable. Solution
To translate from upper case to lower case, use the following command:
cat file1 | tr "[:upper:]" "[:lower:]" > file2To translate file1 from lower case to upper case use:
cat file1 | tr "[:lower:]" "[:upper:]" > file2NOTE: tr(C) can still use '[A-Z]' and '[a-z]' if your locale is set
to the POSIX locale. This can be done as follows for the
sh(C) and ksh(C):LANG=C_C.C; export LANGFor the csh(S):setenv LANG C_C.C See also
Other articles in this database related to the default language,
"I changed the system locale and now the calendar server does not
start", and
"sort(C) tr(C) and ls(C) and other utilities are sorting numbers in
the wrong order"