Linux入门(六)
本文记录下linux下一些小工具.
1: cmatrix命令
cmatrix是一个在终端中显示矩阵效果的命令行工具。它模拟了电影《黑客帝国》中的矩阵效果,给人一种科幻感。当你在终端中运行cmatrix命令时,屏幕上会出现一系列随机的绿色字符,以矩阵的形式不断滚动和变化。cmatrix是一个开源项目,可以在Linux和Unix系统上使用。它提供了一些选项来自定义矩阵效果,例如可以调整字符的颜色、速度和密度等。
安装 :
sudo apt-get install cmatrix
执行:
cmatrix
2: asciiview
AsciiView是一个用于在终端中显示ASCII艺术和字符画的工具。
它可以将任何文本或图像转换为ASCII字符,并在终端中以艺术的方式呈现出来。
AsciiView支持多种不同的字符集和字体样式,可以根据用户的需求进行自定义设置。
安装:
sudo apt install aview
执行:
asciiview '/home/zh/下载/IMG-20230830-WA0008.jpg' -driver curses
3: oneko
Oneko是一个经典的桌面小工具,它是一个可爱的小猫咪图标,会在你的屏幕上跑来跑去。
它最初由日本程序员Yuji Takenouchi开发,于1997年发布。
你可以用鼠标点击它,它会追踪你的鼠标移动,并且会有一些有趣的动作和表情。
Oneko的源代码是开放的,所以你可以根据自己的需求进行修改和定制。它也有一些变种版本,比如Neko、Nyancat等,它们都是基于Oneko的改进版本。
安装:
sudo apt-get install oneko
执行:
oneko
4: pv命令
sudo apt-get install pv
echo "hello world " |pv -qL 10
5: shellcheck
ShellCheck是一个静态代码分析工具,用于检查Shell脚本中的常见错误和潜在问题。
它可以帮助开发者找出脚本中的语法错误、变量使用问题、安全漏洞等,并提供相应的建议和修复建议。
ShellCheck支持多种Shell脚本语言,包括Bash、sh、ksh等。
sudo apt-get install shellcheck
检验:
shellcheck '/home/zh/test.sh'
In /home/zh/test.sh line 2:
src=2
^-^ SC2034: src appears unused. Verify use (or export if used externally).
In /home/zh/test.sh line 18:
printf "$Prompt"
^-------^ SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
In /home/zh/test.sh line 19:
read Ags
^--^ SC2162: read without -r will mangle backslashes.
In /home/zh/test.sh line 61:
printf "$Prompt"
^-------^ SC2059: Don't use variables in the printf format string. Use printf "..%s.." "$foo".
In /home/zh/test.sh line 62:
read Ags ;;
^--^ SC2162: read without -r will mangle backslashes.
For more information:
https://www.shellcheck.net/wiki/SC2034 -- src appears unused. Verify use (o...
https://www.shellcheck.net/wiki/SC2059 -- Don't use variables in the printf...
https://www.shellcheck.net/wiki/SC2162 -- read without -r will mangle backs...