分类: LINUX
2010-02-25 13:35:04
#!/bin/bash
ver(){
cat /proc/version
}
mem(){
cat /proc/meminfo
}
part(){
cat /proc/partitions
}
X=`dialog --title "pick a choice" --stdout --menu "Please Choice one:" 15 45 5 V "Display the version information" M "Display the memory information" P "Display the partition infomation" Q "Quit"`
clear
case $X in
V) ver ;;
M) mem ;;
P) part ;;
Q) exit 2
esac