- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: discovered an issue when performing a remote t...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2010 01:33 AM
тАО08-21-2010 01:33 AM
Re: discovered an issue when performing a remote tr (translate) command on hpux 11v3.
$ remsh badBOX 'printf "\\141\\142\\103\\144\\n" | /usr/bin/tr "[a-z]" "[A-Z]" | od -b'
0000000 101 102 142 104 012
0000005
OK, so it definitely looks like a problem with tr. But on second thought, it might be a locale problem too.
One more test:
remsh badBOX 'echo abCd | LC_ALL=C tr "[a-z]" "[A-Z]"'
Setting LC_ALL=C makes all locale-specific processing fall back to POSIX standrd US-ASCII. If this makes the problem go away, then perhaps the locale files for your default locale en_US.iso88591 (located in /usr/lib/nls/loc/) are broken on badBOX.
Perhaps someone with root access has experimented with the "localedef" command and made a little mistake?
You might also copy /usr/bin/tr from goodBOX to /tmp/tr on the badBOX, then run the tests using /tmp/tr instead of /usr/bin/tr. If this fixes the problem, then it conclusively proves that badBOX's /usr/bin/tr is broken.
------
Dennis> A better output is hex, not octal: echo abCd | xd -tx1 -tc"
Maybe, assuming that you are already familiar with hex values of ASCII characters. I would have used it if printf(1) could accept hex escapes.
But as it can't, octal is unavoidable. And as I'm already potentially confusing people, having input in octal and output in hex would make it even harder to figure out what's going on if the reader is not already familiar with all the tools and concepts I used.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-21-2010 10:42 PM
тАО08-21-2010 10:42 PM
Re: discovered an issue when performing a remote tr (translate) command on hpux 11v3.
That's why I had the ENVs printed.
>You might also copy /usr/bin/tr from goodBOX to /tmp/tr on the badBOX
Manny said the cksum matched. But libc and the locale libs could be different.
>assuming that you are already familiar with hex values of ASCII characters.
That's why there is ascii(5) with octal and hex.
>octal is unavoidable.
You could put the chars in a file and do a hex dump on them to prove they're correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2010 09:25 AM
тАО08-25-2010 09:25 AM
Re: discovered an issue when performing a remote tr (translate) command on hpux 11v3.
# remsh badBOX -l testuser "echo abCd | tr '[a-z]' '[A-Z]'"
ABbD
# remsh badBOX -l testuser "unset LANG;echo abCd | tr '[a-z]' '[A-Z]'"
ABCD
#
thank you all...your input is always appreciated :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2010 09:27 AM
тАО08-25-2010 09:27 AM
Re: discovered an issue when performing a remote tr (translate) command on hpux 11v3.
# remsh badBOX -l testuser "echo abCd | tr '[a-z]' '[A-Z]'"
ABbD
# remsh badBOX -l testuser "unset LANG;echo abCd | tr '[a-z]' '[A-Z]'"
ABCD
the following setting does not exist on the goodBOX:
> cat /etc/rc.config.d/LANG
#!/sbin/sh
# @(#)B.11.31_LR
# Language preference. See lang(5), hpnls(5)
#
# LANG: Locale name
#
# Note: if using the default C locale, many commands will execute faster if
# LANG is not set.
#
#LANG=C
#export LANG
LANG=en_US.iso88591
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2010 12:16 AM
тАО08-26-2010 12:16 AM
Re: discovered an issue when performing a remote tr (translate) command on hpux 11v3.
echo abCd | tr '[a-z]' '[A-Z]'
Ah. If you want to do this, you have to be in the American Nerd locale, not this goofy dictionary sort locale.
Basically what you asked for was:
a
A AE a ... Z
See /usr/lib/nls/loc/src/en_US.iso1.src LC_COLLATE category.
From the man page, you probably want:
tr '[:lower:]' '[:upper:]'
- « Previous
-
- 1
- 2
- Next »