usershell.sh

显示用户登录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

作者: xyqcuijia   发布时间: 2010-12-17