- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Hex to char
Operating System - HP-UX
1754325
Members
2482
Online
108813
Solutions
Forums
Categories
Company
Local Language
юдл
back
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
юдл
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
тАО04-08-2002 11:25 PM
тАО04-08-2002 11:25 PM
Hex to char
Hi:
I would like to write a shell script to translate a string of hexadecimal characters into its ASCII representation (e.g. "41424241" into "ABBA").
Any help?
Thanks.
I would like to write a shell script to translate a string of hexadecimal characters into its ASCII representation (e.g. "41424241" into "ABBA").
Any help?
Thanks.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2002 11:50 PM
тАО04-08-2002 11:50 PM
Re: Hex to char
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2002 12:21 AM
тАО04-09-2002 12:21 AM
Re: Hex to char
Hi, I tend to use ksh which definitely works but I recon this should work for all shells:
# Convert Dec --> Hex
printf "%X\n"
# This will give capital hex e.g A (== 10 dec)
printf "%x\n"
# This will give lower cace e.g a (== 10 dec)
# Convert Hex --> Dec
printf "%d\n" 0x
# Remember to put on the leading 0x to show it is hex
simple
Tim
# Convert Dec --> Hex
printf "%X\n"
# This will give capital hex e.g A (== 10 dec)
printf "%x\n"
# This will give lower cace e.g a (== 10 dec)
# Convert Hex --> Dec
printf "%d\n" 0x
# Remember to put on the leading 0x to show it is hex
simple
Tim
-
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP