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

x
?
Solved

POSIX SH: ASCII value for a character

Posted on 1999-09-29
3
Medium Priority
?
330 Views
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?
0
Comment
Question by:tryno
[X]
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
3 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2085376
Where does the character come from?
0
 

Accepted Solution

by:
pksundar earned 200 total points
ID: 2086745
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..
0
 

Author Comment

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

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 : http://www.videocopilot.net/presets/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