I am trying to make it that if the user inputs a non existing user they would be asked to retry again, but it is the opposite effect. I am sure it is something wrong with my while condition I just cant see :(
code:
#!/bin/bash
echo -n "Name of the username: "
read username
while id -u $username >/dev/null 2>&1;
do
echo "User doesn't exist"
echo -n "Name of the username: "
read username
done