Using sed, tr, or grep, Convert Letters to Numbers

      Substitute for each letter its numeric alphabetic position. That is A goes to 1, Z goes to 26 etc. Lower case letters are also changed.

Any ideas?

vupadhyaAsked:
Who is Participating?
 
ozoCommented:
tr won't handle translating 'Z' to '26'
It's possible with sed, but easier with  awk or perl
0
 
ahoffmannCommented:
sounds like a homework assignment, could you please post what you have done so far
0
 
SubhumanCommented:
man tr
0
 
SubhumanCommented:
and just for fun, man sed and man grep too.
0
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.

All Courses

From novice to tech pro — start learning today.