In Unix, how to print or echo characters using the value of their decimal, hex, octal and unicode.
A = 101 in octal
A = 41 in hexadecimal
A = 65 in decimal
A = 0041 in unicode
How can I print or echo the character 'A' using the value of their decimal, hex, octal and unicode.
How you print something usually depends somewhat on the context. However, just to print the A's using perl you could do the following:
$ perl -e 'print chr(65),chr(0x41),chr(0101), "\n";'
They chr() function calls are shown taking the decimal, hex and octal values respectively.