summaryrefslogtreecommitdiff
path: root/static/unix-v10/man1/ascii.1
blob: 3495a2977f2bb98ef07cf10b3401c4d235237a22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
.TH ASCII 1 
.CT 1 inst_info
.SH NAME
ascii \- interpret ASCII characters
.SH SYNOPSIS
.B ascii
[
.BI -oxdb n
]
[
.B -nct
]
[
.B -e
]
[
.I text
]
.SH DESCRIPTION
.I Ascii
prints the
.SM  ASCII 
values corresponding to characters and
.I vice
.IR versa .
The values are interpreted in a settable numeric base;
.B -o
specifies octal (the default),
.B -d
decimal,
.B -x
hexadecimal, and
.BI -b n
base
.I n.
.PP
With no arguments,
.I ascii
reproduces
.F /usr/pub/ascii
in the specified base.
Characters of
.I text
are converted to their
.SM  ASCII 
values, one per line.
If, however, the first
.I text
argument
is a valid number in the specified base, conversion
goes the opposite way.
Control characters are printed as they appear in
.FR /usr/pub/ascii .
Other options are:
.TP
.B -n
Force numeric output.
.TP
.B -c
Force character output.
.TP
.B -t
Convert from numbers to running text; do not interpret
control characters or insert newlines.
.TP
.B -e
Interpret remaining arguments as
.I text.
.SH EXAMPLES
.TP
.L "ascii -d"
Print the
.SM  ASCII 
table base 10.
.TP
.L "ascii p"
Print the octal value of `p'.
.TP
.L "ascii 160"
Show which character is octal 160.
.SH "SEE ALSO
.IR ascii (6)