vim shell.sh
read -p "please input a username:" MYUSER
if cut -d: -f1 |grep "^$MYUSER$" /etc/passwd &>/dev/null
then
MYSHELL=`grep "^MYUSER" /etc/passwd | cut -d: -f7 `
echo "${MYUSER}'s shell is $MYSHELL"
else
echo "$MYUSER is not exist"
fi