标签:Shell
#!/bin/bashwhile :
do
echo "1. 查看CPU
read -p "请选择菜单: " item
if [ ${item} -eq 1 ]; then
echo "CPU工作频率如下:"
cat /proc/cpuinfo | grep MH
read -p "输入回车继续"
fi
if [ ${item} -eq 2 ]; then
echo "可用内存如下: "
free | grep +
read -p "输入回车继续"
fi
if [ ${item} -eq 3 ]; then
echo "磁盘数据如下: "
df -h | grep boot
read -p "输入回车继续"
fi
if [ ${item} -eq 4 ]; then
echo "IP信息如下: "
ifconfig | grep "Bcast"
read -p "输入回车继续"
fi
if [ ${item} -eq 5 ]; then
exit 0
fi
done
标签:Shell
原文地址:http://blog.51cto.com/13765598/2120056