usershell.sh
时间:2010-12-17 来源:xyqcuijia
显示用户登录shell
#!/bin/bash
read -p "Please input username:" A
if grep "^$A" /etc/passwd > /dev/null;then
echo "$A's shell is:"
grep "$A" /etc/passwd | cut -d: -f7
else
echo "The user is not exist."
fi
echo "$A's shell is:"
grep "$A" /etc/passwd | cut -d: -f7
else
echo "The user is not exist."
fi
相关阅读 更多 +