Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


POSIX SH: ASCII value for a character

Posted on 1999-09-29
Medium Priority
Last Modified: 2013-12-26
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?
Question by:tryno
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 84

Expert Comment

ID: 2085376
Where does the character come from?

Accepted Solution

pksundar earned 200 total points
ID: 2086745
You can store the character in a file and use get the value in hex/decimal,you can use the various options given by od..
for more details,see man od..

Author Comment

ID: 2087178
great! "od" was exactly what I needed, thank you!

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this post we will learn different types of Android Layout and some basics of an Android App.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : All lightning effects with instructions : http://www.mediaf…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question