Question: Code for authLoop.sh : str 1 = eecs 2 0 3 1 #assigning eecs 2 0 3 1

"Code for authLoop.sh :
str1=""eecs2031""
#assigning ""eecs2031"" to variable PSWORD
read -p ""Enter the password: "" password
#comparing the password enter by the user with the one stored
while [ $password != $str1]
do
echo ""Authentication failed"" #Echo command prints the quoted statement
read -p ""Enter the password: "" password
done #This will keep asking to enter a password until we enter the right one.
echo ""Authentication successfu UT16 l"" #Echo command prints the quoted statement
Now, please solve problem #1Problem 1: Write a scrip named authFunc.sh that does the same task as the script authLoop.sh in the homework for November 13, but write two functions to display the messages ""Authentication successful"" and ""Authentication failed"". Name the functions prtSuccess and prtFailure, respectively. % authLoop.sh Enter the password: eecs1009 Authentication failed Enter the password: eecs3101 Authentication failed Enter the password: math1019 Authentication failed Enter the password: eecs2031 Authentication successful"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!