#! /bin/bash
clear
echo "-----------------------menu----------------"
echo "1)show time"
echo "2)CPU load"
echo "3)Memory Free"
echo "0)Exit"
echo "-------------------------------------------"
echo -n "Entern you chose[0-3]:"
read NUM
case $NUM in
1) echo "`date +%T`";;
2) echo "`uptime | awk ‘{print $8}‘`";;
3) echo "`free | awk ‘$1=="Mem:"{print $4}‘`";;
0) exit;;
*) echo "basename $This is not between 1 and 3";;
esac
时间: 2024-10-24 22:19:15