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

Posted 旅行者3468号

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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

  

以上是关于shell 脚本中使用case查看登陆用户的主要内容,如果未能解决你的问题,请参考以下文章