who | wc -wcl
wc -l nusers
echo "welcome to Bash"
echo wel
echo 'asd'
echo 'asd!'
printf "Hello World"
printf "Hello World\n"
echo -e "1\t2\t3" output 1 2 3
echo"1\t2\t3" output 1\t2\t3
echo -e "\e[1;31m this is red txt \e[0m"
echo -e "\e[1;32m this is red txt"
echo -e "\e[1;43m Yellow Background \e[0m"
top
ps
pgrep gedit
pgrep init
cat /proc/5925/environ
cat /proc/12501/environ | tr '\0' '\n'
hp@ubuntu:~/shel$ echo "h!"
bash: !": event not foundShell Scripting Cookbook1
最新推荐文章于 2025-05-31 20:27:22 发布
本文介绍了Bash中常用命令的使用方法,包括echo、printf、top等,并展示了如何使用颜色和特殊字符来丰富输出内容。此外,还介绍了通过ps、pgrep等命令获取进程信息的方法,以及如何读取特定进程环境变量。
521

被折叠的 条评论
为什么被折叠?



