Translate

Archives

Image of Beginning Google Maps API 3
Image of Linux Kernel Development (3rd Edition)
Image of Advanced Programming in the UNIX Environment, Second Edition (Addison-Wesley Professional Computing Series)
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)

Korn Shell Ordinal Number Conversion

It is useful to be able to convert to and from ASCII ordinal numbers in scripts. Here is one way of doing it in Korn shell scripts. To convert the character ‘F’ to it’s ASCII ordinal value: $ print $((‘F’)) 70 To display the ASCII character associated with the ordinal number 70: $ typeset -i8 c=70 $ printf “\${c#*#}n” F