Display an ASCII table of characters 32 to 112 wit

2019-09-28 03:04发布

Please, I want to know how to display an ASCII table of characters 32 to 112.

标签: bash shell
2条回答
劳资没心,怎么记你
2楼-- · 2019-09-28 03:21

You can do it quite succinctly with Perl like this:

perl -E 'say $_," --> ",chr($_) for (32..112)' 

Sample Output

32 -->  
33 --> !
34 --> "
35 --> #
36 --> $
37 --> %
38 --> &
39 --> '
40 --> (
41 --> )
...
...
查看更多
Bombasti
3楼-- · 2019-09-28 03:40

You can use following command

man ascii

It shows ascii table.

For displaying ascii from 32 to 112

for((i=32;i<=112;i++)) do printf "$i --> ";printf \\$(printf '%03o\t' "$i");printf '\n' ;done;printf "\n"
查看更多
登录 后发表回答