Created
September 1, 2013 15:58
-
-
Save mtrovilho/6405357 to your computer and use it in GitHub Desktop.
simple script to convert letters into numbers from telephone pad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
INPUT="${1}" | |
echo $INPUT |\ | |
tr -cd '[:alnum:]' |\ | |
tr 'aAbBcC' '2' |\ | |
tr 'dDeEfF' '3' |\ | |
tr 'gGhHiI' '4' |\ | |
tr 'jJkKlL' '5' |\ | |
tr 'mMnNoO' '6' |\ | |
tr 'pPqQrRsS' '7' |\ | |
tr 'tTuUvV' '8' |\ | |
tr 'wWxXyYzZ' '9' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment