shell 脚本中使用case查看登陆用户

#! /bin/bash
case $USERNAME in
"student")echo u r using student;;
"leonard")echo u r using leonard;;
*)echo u r using other account;;
esac

  

posted on 2016-12-09 23:39  leonardhelloworld  阅读(223)  评论(0编辑  收藏  举报

导航