generate ascii table
$ cat ascii.sh
dec_count=0 while [ $dec_count -lt 256 ]
do
echo -e "\x$(echo "ibase=10;obase=16;$dec_count" | bc)\c"
dec_count=$((dec_count+1))
done $ bash ascii.sh | hexdump -C
00000000 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f |................|
00000010 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f |................|
00000020 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f | !"#$%&'()*+,-./|
00000030 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f |0123456789:;<=>?|
00000040 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f |@ABCDEFGHIJKLMNO|
00000050 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f |PQRSTUVWXYZ[\]^_|
00000060 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f |`abcdefghijklmno|
00000070 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f |pqrstuvwxyz{|}~.|
00000080 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f |................|
00000090 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f |................|
000000a0 a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af |................|
000000b0 b0 b1 b2 b3 b4 b5 b6 b7 b8 b9 ba bb bc bd be bf |................|
000000c0 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 ca cb cc cd ce cf |................|
000000d0 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 da db dc dd de df |................|
000000e0 e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef |................|
000000f0 f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe ff |................|
00000100
$ cat ascii.sh
dec_count=32 while [ $dec_count -lt 128 ]
do
times=0
while [ $times -lt 16 ]
do
echo -e "\x$(echo "ibase=10;obase=16;$dec_count" | bc)\c"
times=$((times+1))
done
dec_count=$((dec_count+1))
done $ bash ascii.sh | hexdump -C | cut -c57-60,64 > ascii_table $ cat ascii_table
20
21 !
22 "
23 #
24 $
25 %
26 &
27 '
28 (
29 )
2a *
2b +
2c ,
2d -
2e .
2f /
30 0
31 1
32 2
33 3
34 4
35 5
36 6
37 7
38 8
39 9
3a :
3b ;
3c <
3d =
3e >
3f ?
40 @
41 A
42 B
43 C
44 D
45 E
46 F
47 G
48 H
49 I
4a J
4b K
4c L
4d M
4e N
4f O
50 P
51 Q
52 R
53 S
54 T
55 U
56 V
57 W
58 X
59 Y
5a Z
5b [
5c \
5d ]
5e ^
5f _
60 `
61 a
62 b
63 c
64 d
65 e
66 f
67 g
68 h
69 i
6a j
6b k
6c l
6d m
6e n
6f o
70 p
71 q
72 r
73 s
74 t
75 u
76 v
77 w
78 x
79 y
7a z
7b {
7c |
7d }
7e ~
7f . [daniel@win-8me2aq586jt Creates message box.53BA45E9]$
Prelude> zip [0x1..0x7f] ['\x01'..'\x7f']
[(1,'\SOH'),(2,'\STX'),(3,'\ETX'),(4,'\EOT'),(5,'\ENQ'),(6,'\ACK'),(7,'\a'),(8,'\b'),(9,'\t'),(10,'\n'),(11,'\v'),(12,'\f'),(13,'\r'),(14,'\SO'),(15,'\SI'),(16,'\DLE'),(17,'\DC1'),(18,'\DC2'),(19,'\DC3'),(20,'\DC4'),(21,'\NAK'),(22,'\SYN'),(23,'\ETB'),(24,'\CAN'),(25,'\EM'),(26,'\SUB'),(27,'\ESC'),(28,'\FS'),(29,'\GS'),(30,'\RS'),(31,'\US'),(32,' '),(33,'!'),(34,'"'),(35,'#'),(36,'$'),(37,'%'),(38,'&'),(39,'\''),(40,'('),(41,')'),(42,'*'),(43,'+'),(44,','),(45,'-'),(46,'.'),(47,'/'),(48,'0'),(49,'1'),(50,'2'),(51,'3'),(52,'4'),(53,'5'),(54,'6'),(55,'7'),(56,'8'),(57,'9'),(58,':'),(59,';'),(60,'<'),(61,'='),(62,'>'),(63,'?'),(64,'@'),(65,'A'),(66,'B'),(67,'C'),(68,'D'),(69,'E'),(70,'F'),(71,'G'),(72,'H'),(73,'I'),(74,'J'),(75,'K'),(76,'L'),(77,'M'),(78,'N'),(79,'O'),(80,'P'),(81,'Q'),(82,'R'),(83,'S'),(84,'T'),(85,'U'),(86,'V'),(87,'W'),(88,'X'),(89,'Y'),(90,'Z'),(91,'['),(92,'\\'),(93,']'),(94,'^'),(95,'_'),(96,'`'),(97,'a'),(98,'b'),(99,'c'),(100,'d'),(101,'e'),(102,'f'),(103,'g'),(104,'h'),(105,'i'),(106,'j'),(107,'k'),(108,'l'),(109,'m'),(110,'n'),(111,'o'),(112,'p'),(113,'q'),(114,'r'),(115,'s'),(116,'t'),(117,'u'),(118,'v'),(119,'w'),(120,'x'),(121,'y'),(122,'z'),(123,'{'),(124,'|'),(125,'}'),(126,'~'),(127,'\DEL')]
daniel@daniel-mint ~/haskell $ cat trizip.hs
import Text.Printf
import Numeric trizip :: [a] -> [b] -> [c] -> [(a,b,c)]
trizip a b c
| null a = []
| null b = []
| null c = []
trizip (x:xs) (y:ys) (z:zs) = (++) [(x,y,z)] (trizip xs ys zs) showtuple :: (Int, Char, Int) -> String
showtuple (di, ch, hi) = (show di) ++ "\t0x" ++ (showHex hi "\t") ++ (show ch) ++ "\n" main = do
let asciit = trizip [0x1..0x7f] ['\x01'..'\x7f'] [0x1..0x7f]
putStr (concat (map showtuple asciit))
daniel@daniel-mint ~/haskell $ runhaskell trizip.hs
1 0x1 '\SOH'
2 0x2 '\STX'
3 0x3 '\ETX'
4 0x4 '\EOT'
5 0x5 '\ENQ'
6 0x6 '\ACK'
7 0x7 '\a'
8 0x8 '\b'
9 0x9 '\t'
10 0xa '\n'
11 0xb '\v'
12 0xc '\f'
13 0xd '\r'
14 0xe '\SO'
15 0xf '\SI'
16 0x10 '\DLE'
17 0x11 '\DC1'
18 0x12 '\DC2'
19 0x13 '\DC3'
20 0x14 '\DC4'
21 0x15 '\NAK'
22 0x16 '\SYN'
23 0x17 '\ETB'
24 0x18 '\CAN'
25 0x19 '\EM'
26 0x1a '\SUB'
27 0x1b '\ESC'
28 0x1c '\FS'
29 0x1d '\GS'
30 0x1e '\RS'
31 0x1f '\US'
32 0x20 ' '
33 0x21 '!'
34 0x22 '"'
35 0x23 '#'
36 0x24 '$'
37 0x25 '%'
38 0x26 '&'
39 0x27 '\''
40 0x28 '('
41 0x29 ')'
42 0x2a '*'
43 0x2b '+'
44 0x2c ','
45 0x2d '-'
46 0x2e '.'
47 0x2f '/'
48 0x30 '0'
49 0x31 '1'
50 0x32 '2'
51 0x33 '3'
52 0x34 '4'
53 0x35 '5'
54 0x36 '6'
55 0x37 '7'
56 0x38 '8'
57 0x39 '9'
58 0x3a ':'
59 0x3b ';'
60 0x3c '<'
61 0x3d '='
62 0x3e '>'
63 0x3f '?'
64 0x40 '@'
65 0x41 'A'
66 0x42 'B'
67 0x43 'C'
68 0x44 'D'
69 0x45 'E'
70 0x46 'F'
71 0x47 'G'
72 0x48 'H'
73 0x49 'I'
74 0x4a 'J'
75 0x4b 'K'
76 0x4c 'L'
77 0x4d 'M'
78 0x4e 'N'
79 0x4f 'O'
80 0x50 'P'
81 0x51 'Q'
82 0x52 'R'
83 0x53 'S'
84 0x54 'T'
85 0x55 'U'
86 0x56 'V'
87 0x57 'W'
88 0x58 'X'
89 0x59 'Y'
90 0x5a 'Z'
91 0x5b '['
92 0x5c '\\'
93 0x5d ']'
94 0x5e '^'
95 0x5f '_'
96 0x60 '`'
97 0x61 'a'
98 0x62 'b'
99 0x63 'c'
100 0x64 'd'
101 0x65 'e'
102 0x66 'f'
103 0x67 'g'
104 0x68 'h'
105 0x69 'i'
106 0x6a 'j'
107 0x6b 'k'
108 0x6c 'l'
109 0x6d 'm'
110 0x6e 'n'
111 0x6f 'o'
112 0x70 'p'
113 0x71 'q'
114 0x72 'r'
115 0x73 's'
116 0x74 't'
117 0x75 'u'
118 0x76 'v'
119 0x77 'w'
120 0x78 'x'
121 0x79 'y'
122 0x7a 'z'
123 0x7b '{'
124 0x7c '|'
125 0x7d '}'
126 0x7e '~'
127 0x7f '\DEL'
generate ascii table的更多相关文章
- ASCII Table
ASCII Table ASCII值 控制字符 ASCII值 控制字符 ASCII值 控制字符 ASCII值 控制字符 0 NUT 32 (space) 64 @ 96 . 1 SOH 33 ! 65 ...
- ASCII Table/ASCII表
ASCII Table/ASCII表 参考: 1.Table of ASCII Characters
- SQL Server ->> Move characters in string N position(s) forward/backward based on ASCII table(根据ASCII表的排列顺序将字符串内的数值往前或者后移N个位)
去年无聊的时候想到想玩一下根据ASCII表的排列顺序将字符串内的数值往前或者后移N个位,顺便看一下是T-SQL性能好还是用C#写CLR函数处理得快.结果是在50万行以下其实两者差距很小,当然这是在我的 ...
- ASCII Table - ASCII码对照表
ASCII控制字符 二进制 十进制 十六进制 缩写 可以显示的表示法 名称/意义 0000 0000 0 00 NUL ␀ 空字符(Null) 0000 0001 1 01 SOH ␁ 标题开始 00 ...
- Ascii vs. Binary Files
Ascii vs. Binary Files Introduction Most people classify files in two categories: binary files and A ...
- Binary to Text (ASCII) Conversion
Binary to Text (ASCII) Conversion Description: Write a function that takes in a binary string and re ...
- ASCII 码对应表
Macron symbol ASCII CODE 238 : HTML entity : [ Home ][ español ] What is my IP address ? your public ...
- DAX/PowerBI系列 - 关于时间系列 - 如何用脚本生成时间维度 (Generate Date Dimension)
跟大家的交流是我的动力. :) DAX/PowerBI系列 - 关于时间系列 - 如何用脚本生成时间维度 (Generate Date Dimension) 难度: ★☆☆☆☆(1星) 适用范围: ★ ...
- (SpringBoot-Jpa)使用Idea数据库自动脚本Generate POJOS生成 Entity对象,
因:使用SpringBoot -jpa,需要手动配置Entity 但是如果你的表中有很多属性,或者有很多表怎么办?? 每个手动写? 还是用mybatis.写mapper??? 解决:使用idea自动工 ...
随机推荐
- left join right inner join 区别
连表查询 select a, b, c from table_a tb_a left (right) join table_b tb_b on tb_a.id = tb_b.id left : tab ...
- day64 views文件
from django.shortcuts import HttpResponse, render, redirect from app01 import models # Create your v ...
- latex 查找缺失的库文件
app-portage/pfl contains a program to search in an online database for a Gentoo package containing a ...
- Java数据访问对象模式
数据访问对象模式或DAO模式用于将低级数据访问API或操作与高级业务服务分离. 以下是数据访问对象模式的参与者. 数据访问对象接口 - 此接口定义要对模型对象执行的标准操作. 数据访问对象具体类 - ...
- Redis项目实战,一些经验总结
来源:https://my.oschina.net/u/920698/blog/3031587 背景 Redis 是一个开源的内存数据结构存储系统. 可以作为数据库.缓存和消息中间件使用. 支持多种类 ...
- c# .netframwork 4.0 调用 2.0时报错 混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的情况下,无法在 4.0 运行时中加载该程序集。
“System.IO.FileLoadException”类型的未经处理的异常在 XXX.dll 中发生 其他信息: 混合模式程序集是针对“v2.0.50727”版的运行时生成的,在没有配置其他信息的 ...
- shell中#*,##*,#*,##*,% *,%% *的含义及用法
介绍下Shell中的${}.##和%%使用范例,本文给出了不同情况下得到的结果.假设定义了一个变量为:代码如下:file=/dir1/dir2/dir3/my.file.txt可以用${ }分别替换得 ...
- UML 简介
虚线箭头指向依赖: 实线箭头指向关联: 虚线三角指向接口: 实线三角指向父类: 空心菱形能分离而独立存在,是聚合: 实心菱形精密关联不可分,是组合:
- .net Core AJAX使用Header传递参数,以JsonResult返回信息
function postHeader() { $.ajax({ url : "/myTest/PostHeader?time="+ (new date()).getTime(), ...
- USB hub串口绑定
方式一 1.查看串口信息 udevadm info /dev/ttyUSB0 2.创建配置文件 sudo vi /etc/udev/rules.d/com_port.rules ACTION==&qu ...