ascii (1) Linux Manual Page
NAME
ascii – report character aliases
SYNOPSIS
-
ascii[-dxohv] [-t] [char-alias…]
OPTIONS
ascii behaves like `ascii -h’. Options are as follows:
-t
- Script-friendly mode, emits only ISO/decimal/hex/octal/binary encodings of the character.
-s
- Parse multiple characters. Convenient way of parsing strings.
-d
- Ascii table in decimal.
-x
- Ascii table in hex.
-o
- Ascii table in octal.
-h, -?
- Show summary of options and a simple ASCII table.
-v
- Show version of program.
DESCRIPTION
Characters in the ASCII set can have many aliases, depending on context. A character’s possible names include:
- • Its bit pattern (binary representation).
- • Its hex, decimal and octal representations.
- • Its teletype mnemonic and caret-notation form (for control chars).
- • Its backlash-escape form in C (for some control chars).
- • Its printed form (for printables).
- • Its full ISO official name in English.
- • Its ISO/ECMA code table reference.
- • Its name as an HTML/SGML entity.
- • Slang and other names in wide use for it among hackers.
This utility accepts command-line strings and tries to interpret them as one of the above. When it finds a value, it prints all of the names of the character. The constructs in the following list can be used to specify character values. If an argument could be interpreted in two or more ways, names for all the different characters it might be are dumped.
character
- Any character not described by one of the following conventions represents the character itself.
^character
- A caret followed by a character.
\[abfnrtv0]
- A backslash followed by certain special characters (abfnrtv).
mnemonic
- An ASCII teletype mnemonic.
hexadecimal
- A hexadecimal (hex) sequence consists of one or two case-insensitive hex digit characters (01234567890abcdef). To ensure hex interpretation use hex
h,0xhex,xhex or
