Here “ == ” is used for pattern matching, where == looks for “r” at start of username and if found , condition is TRUE. We can also use “!=” which would be TRUE when “r ” si not found at start of username.

So, this completes our tutorial for BASH scripting, in this tutorial we learned advanced uses of if-then conditional statement. In our next tutorial, we will learn about for conditional statement.

Also please mention you feedback/queries down below in comment box. ADIOS !!!

If you think we have helped you or just want to support us, please consider these :-