本文共 503 字,大约阅读时间需要 1 分钟。
#!/bin/bash
while :
doecho "1. 查看CPUread -p "请选择菜单: " item
if [ ${item} -eq 1 ]; thenecho "CPU工作频率如下:"cat /proc/cpuinfo | grep MHread -p "输入回车继续"fiif [ ${item} -eq 2 ]; then
echo "可用内存如下: "free | grep +read -p "输入回车继续"fiif [ ${item} -eq 3 ]; then
echo "磁盘数据如下: "df -h | grep bootread -p "输入回车继续"fiif [ ${item} -eq 4 ]; then
echo "IP信息如下: "ifconfig | grep "Bcast"read -p "输入回车继续"fi
if [ ${item} -eq 5 ]; thenexit 0fidone转载于:https://blog.51cto.com/13765598/2120056