Itried a simple script utilising awk - but it wouldn't work from alpha to numeric, but did work the other way round :
#!/bin/ksh
echo "enter a letter or a number > 64 and < 128.."
read numb
echo $numb|awk '{ printf("Alpha answer is %c and numeric is %d\n",$1,$1)}'
Anyone know why single characters won't decode to their ascii value in printf in awk, whereas numerics will convert ? Dickie Bird (-)))
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.