p8.sh
#!/bin/bash
echo "Enter Username: "
read name
if grep "$name" /etc/passwd
then
echo "User exist"
else
echo "User doesnt exist"
fi
#!/bin/bash
echo "Enter Username: "
read name
if grep "$name" /etc/passwd
then
echo "User exist"
else
echo "User doesnt exist"
fi