• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 342
  • Last Modified:

POSIX SH: ASCII value for a character

I need to convert a character to its ASCII-number in a
POSIX shell-script.  Decimal, octal or hexadeciman is not imperative, but a method that presents all of them would, of course, be the very best answer.
Anybody with an elegant solution?
1 Solution
Where does the character come from?
You can store the character in a file and use od..to get the value in hex/decimal,you can use the various options given by od..
for more details,see man od..
trynoAuthor Commented:
great! "od" was exactly what I needed, thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now