[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1215
  • 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";'

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

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