?
Solved

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

Posted on 2005-04-28
4
Medium Priority
?
261 Views
Last Modified: 2013-12-26
      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?

0
Comment
Question by:vupadhya
  • 2
4 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13887276
sounds like a homework assignment, could you please post what you have done so far
0
 
LVL 1

Expert Comment

by:Subhuman
ID: 14491518
man tr
0
 
LVL 1

Expert Comment

by:Subhuman
ID: 14491520
and just for fun, man sed and man grep too.
0
 
LVL 85

Accepted Solution

by:
ozo earned 1500 total points
ID: 14507400
tr won't handle translating 'Z' to '26'
It's possible with sed, but easier with  awk or perl
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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.
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

864 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