判断当前系统登录用户_shell脚本
#!/bin/bash
#
user=`whoami`
if [ "$user" == "root" ];then
echo "root is super user"
else
echo "$user is a normal user"
fi
#!/bin/bash
#
user=`whoami`
if [ "$user" == "root" ];then
echo "root is super user"
else
echo "$user is a normal user"
fi