Predict the output of the following code.

#!/bin/bash

name="Hans"

test $name == "Hanss"

case $? in

0) echo "The name is Hans";;

*) echo "The name is not known;;

1) echo "The name is not Hans";;

esac

The name is not Hans

The name is not known

case statement contains a syntax error.

The name is Hans

Verified Answer
Correct Option - b

To get all Self Assessment - Introduction to Unix Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram