Tyleo-Dev-ShellScripting-Ol.../SH/checkuserexistence.sh

10 lines
172 B
Bash
Raw Permalink Normal View History

2024-02-18 21:29:57 +00:00
#!/bin/sh
echo -n "Enter a username to check: "
read name
if grep $name /etc/passwd > /dev/null
then
echo "$name is on this system"
else
echo "$name does not exist"
fi