shell 脚本常用工具箱

@努力的小王  March 21, 2018
#!/bin/env bash
##this is centos system  normal toolbar
##author xw 2018.3.21
clear
menu() {
cat <<-EOF
        h. help
        f. disk partition
        d. disk  mount
        m. memmory
        u. system load
        q. quit
EOF

}

menu
read -p "Please input [ q exit ]:" action

case "$action" in
h)
    menu
    ;;

f)

   fdisk -l
    ;;

d)

df -Th
  ;;

m)
   free -m
    ;;
u)

 uptime
   ;;
"")
  
 echo "Please read menu"
    ;;
q)
exit
;;

*)

   echo "error Please talk administrator"
esac

添加新评论