read -p "Enter your username:" username if grep -q $username "$user.txt" then echo "Username already exists. Try another one." exit fi read -s -p "Enter your password:" password read -p "Enter your salary:" salary read -p "Enter your e-mail:" email if grep -q $email "$user.txt" then echo "E-mail already exists.Try another one." exit fi if[-f$"user.txt"] then if[-w$"user.txt] then echo $username $password $salary $email >> $"user.txt" echo "User saved." fi fi echo "USER LIST" a=1 while readline;do echo "$line" a=$((a+1)) done<$"user.txt"