Computer scienceSystem administration and DevOpsCommand lineBash syntax

Conditional statements and test checks

Password checking

Report a typo

Check if the password stored in the system is equal to the password entered by the user. The password stored in the system is passed as the first parameter to the solve() function while the password entered by the user is passed as the second parameter.

If both passwords are equal, print Correct password entered. Proceeding further. If the passwords are not equal, print Incorrect password. Please try again.

Sample Input 1:

MyPass$%
MyPass$%

Sample Output 1:

Correct password entered. Proceeding further
Write a program in Shell
#!/usr/bin/env bash

solve() {
# add your solution here

}
___

Create a free account to access the full topic