I got help with a hw question but when I tried typing in the code into Linux I k
ID: 3700048 • Letter: I
Question
I got help with a hw question but when I tried typing in the code into Linux I keep getting errors so it won’t run. echo press 1: Add a user with Password cho press 2: Add a group without a password." echo press 3: Add a user to group." ead Choice case $Choice in read -p "Enter usernameusername read -s -p "Enter password,typing is invisible:" assword echo echo "Wait a while for encryption egrep username tc/passud>/de/nu11 check if the user exists if $? -eq then echo "Susername exists!" exit 1 else not creating a user 'usergroups" 67L, 1427C writtern Isuli0loca lhost /usergroups /usergroups ine 58: unexpected EOF while looking for matching" usergroups: lne 68: syntax error: unexpected end of file [suli01oca lhost 1SExplanation / Answer
Source Code:
echo "press1: Add a user with password."
echo "press2 : Add a group without a password."
read choice
case $choice in
1)
read -p "Enter username : " username
read -s -p "Enter password : " password
echo "Wait a while for encryption . "
egrep "^$username" /etc/passwd/dev/null
;;
*)
esac
Note:
Whatever you wrote i tried completing up to the point, you here in your code got so many syntax errors. Please do refer and then change it accordingly. Post your whole code so that each and every part of the code is made syntax error free.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.