#! /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查看登陆用户
原文:http://www.cnblogs.com/leonarcohen/p/6152842.html