⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pr-asc.sh

📁 Shall高级编程
💻 SH
字号:
#!/bin/bash# pr-ascii.sh: Prints a table of ASCII characters.START=33   # Range of printable ASCII characters (decimal).END=125echo " Decimal   Hex     Character"   # Header.echo " -------   ---     ---------"for ((i=START; i<=END; i++))do  echo $i | awk '{printf("  %3d       %2x         %c\n", $1, $1, $1)}'# The Bash printf builtin will not work in this context:#     printf "%c" "$i"doneexit 0#  Decimal   Hex     Character#  -------   ---     ---------#    33       21         !#    34       22         "#    35       23         ##    36       24         $##    . . .##   122       7a         z#   123       7b         {#   124       7c         |#   125       7d         }#  Redirect the output of this script to a file#+ or pipe it to "more":  sh pr-asc.sh | more

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -