Control Character knowledge popularization

Source: Internet
Author: User
Tags control characters file separator number sign


The ASCII character set is defined as 128 characters (0 to 127). The first 32 values are non-printable control characters (0-31 and 127), such as ^ G 7
Bell ).


Control characters:

Char

Octal Decimal Hexadecimal Control-Key Control Action
Nul 0 0 0 ^ @ NULL Character
Soh 1 1 1 ^ Start of heading, = console interrupt
STX 2 2 2 ^ B Start of text, maintenance mode on HP Console
Etx 3 3 3 ^ C End of Text
EOT 4 4 4 ^ D End of transmission, not the same as etb
Enq 5 5 5 ^ E Enquiry, goes with ack; old HP Flow Control
ACK 6 6 6 ^ F Acknowledge, clears Enq logon hand
Bel 7 7 7 ^ G Bell, rings the bell...
BS 10 8 8 ^ H Backspace, works on HP terminals/computers
HT 11 9 9 ^ I Horizontal tab, move to next tab stop
Lf 12 10 A ^ J Line feed
Vt 13 11 B ^ K Vertical Tab
FF 14 12 C ^ L Form feed, page eject
Cr 15 13 D ^ M Carriage Return
So 16 14 E ^ N Shift out, alternate Character Set
Si 17 15 F ^ O Shift in, resume defaultn Character Set
DLE 20 16 10 ^ P Data Link escape
DC1 21 17 11 ^ Q Xon, with xoff to pause listings; ": Okay to send ".
DC2 22 18 12 ^ R Device Control 2, block-mode Flow Control
DC3 23 19 13 ^ S Xoff, with Xon is term = 18 Flow Control
Dc4 24 20 14 ^ T Device Control 4
Nak 25 21 15 ^ U Negative acknowledge
SYN 26 22 16 ^ V Synchronous idle
Etb 27 23 17 ^ W End transmission block, not the same as EOT
Can 30 24 17 ^ X Cancel line, MPE echoes !!!
Em 31 25 19 ^ Y End of medium, control-y interrupt
Sub 32 26 1a ^ Z Substitute
ESC 33 27 1B ^ [ Escape, next character is not echoed
FS 34 28 1c ^ \ File Separator
GS 35 29 1D ^] Group Separator
RS 36 30 1e ^ Record separator, block-mode Terminator
Us 37 31 1f ^ _ Unit Separator

Print characters

Char Octal Dec HEX Description
SP 40 32 20 Space
! 41 33 21 Exclamation mark
" 42 34 22 Quotation Mark (& quot; in HTML)
# 43 35 23 Cross Hatch (number sign)
$ 44 36 24 Dollar sign
% 45 37 25 Percent sign
& 46 38 26 Ampersand
` 47 39 27 Closing single quote (apostrophe)
( 50 40 28 Opening parentheses
) 51 41 29 Closing parentheses
* 52 42 2a Asterisk (Star, multiply)
+ 53 43 2b Plus
, 54 44 2c Comma
- 55 45 2d Hyphen, Dash, minus
. 56 46 2e Period
/ 57 47 2f Slant (forward slash, divide)
0 60 48 30 Zero
1 61 49 31 One
2 62 50 32 Two
3 63 51 33 Three
4 64 52 34 Four
5 65 53 35 Five
6 66 54 36 Six
7 67 55 37 Seven
8 70 56 38 Eight
9 71 57 39 Nine
: 72 58 3A Colon
; 73 59 3b Semicolon
< 74 60 3c Less than sign (& lt; in HTML)
= 75 61 3D Equals sign
> 76 62 3E Greater than sign (& gt; in HTML)
? 77 63 3f Question mark
@ 100 64 40 At-sign
A 101 65 41 Uppercase
B 102 66 42 Uppercase B
C 103 67 43 Uppercase C
D 104 68 44 Uppercase d
E 105 69 45 Uppercase E
F 106 70 46 Uppercase F
G 107 71 47 Uppercase g
H 110 72 48 Uppercase H
I 111 73 49 Uppercase I
J 112 74 4A Uppercase J
K 113 75 4b Uppercase K
L 114 76 4C Uppercase L
M 115 77 4d Uppercase m
N 116 78 4e Uppercase n
O 117 79 4f Uppercase o
P 120 80 50 Uppercase P
Q 121 81 51 Uppercase Q
R 122 82 52 Uppercase R
S 123 83 53 Uppercase s
T 124 84 54 Uppercase t
U 125 85 55 Uppercase u
V 126 86 56 Uppercase v
W 127 87 57 Uppercase W
X 130 88 58 Uppercase x
Y 131 89 59 Uppercase y
Z 132 90 5A Uppercase Z
[ 133 91 5b Opening square bracket
\ 134 92 5C Reverse slant (backslash)
] 135 93 5D Closing square bracket
^ 136 94 5E Caret (circumflex)
_ 137 95 5f Underscore
` 140 96 60 Opening single quote
A 141 97 61 Lowercase
B 142 98 62 Lowercase B
C 143 99 63 Lowercase C
D 144 100 64 Lowercase d
E 145 101 65 Lowercase E
F 146 102 66 Lowercase F
G 147 103 67 Lowercase G
H 150 104 68 Lowercase H
I 151 105 69 Lowercase I
J 152 106 6a Lowercase J
K 153 107 6b Lowercase K
L 154 108 6c Lowercase L
M 155 109 6d Lowercase m
N 156 110 6e Lowercase n
O 157 111 6f Lowercase o
P 160 112 70 Lowercase P
Q 161 113 71 Lowercase Q
R 162 114 72 Lowercase R
S 163 115 73 Lowercase s
T 164 116 74 Lowercase t
U 165 117 75 Lowercase u
V 166 118 76 Lowercase v
W 167 119 77 Lowercase W
X 170 120 78 Lowercase x
Y 171 121 79 Lowercase y
Z 172 122 7A Lowercase Z
{ 173 123 7b Opening curly brace
| 174 124 7c Vertical Line
} 175 125 7D Cloing curly brace
~ 176 126 7E Tilde (approximate)
Del 177 127 7f Delete (rubout), cross-hatch box

Shell processing control characters:

Sometimes there will be a control character in the text, such as test1:

You must use cat-V or cat-a to view the control character ^.

21.703073010384102 ^ a24.714308723165203 ^ a27.38294431629967 ^ a32.307091875806 ^ a76429 ^ a209438

Convert ^ A to a space. ^ A is 1 (or 01, 001), and a space is 40 (or 040 ). Redirect to test2.

Tr-s "[\ 001]" [\ 040 *] "<test1> Test2


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.