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

  

原文地址:https://www.cnblogs.com/leonarcohen/p/6152842.html