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

How to convert ASCII char to integer in csh

It seems you can convert a integer  to ASCII char  using " echo 65 | awk '{printf "%c\n", $1}'", but it seems that you cannot convert a char to integer.

Is there a simple way to convert an ASCII char like 'A' to the ascii decimal equivilent of '65' and so on... in csh?
1 Solution
Kim RyanIT ConsultantCommented:
You can do this with a perl  one liner
perl -e 'print ord("A"),"\n";'
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

Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

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