Elif


Linux Bash Public New

Easy 

5min


Select all the statements about the output of the following script that are correct.

#!/bin/bash
value=$1
if [ $value -eq 100 ]
then
    echo "value is eq 100"
elif [ $value -gt 100 ]
then
    echo "value is gt 100"
else
    case $value in
    [1-3]*) echo "value is between 1 and 39 (inclusive)" ;;
    [4-5]*) echo "value is between 40 and 59 (inclusive)" ;;
    9[1-8]) echo "value is between 91 and 98 (inclusive)" ;;
    99) echo "value is $value" ;;
    *) echo "value is unknown" ;;
    esac
fi
If the first argument of the script is 35 then 'value is unknown' echoed.
If the first argument of the script is 90 then 'value is unknown' echoed.
If the first argument of the script is 91 then 'value is between 91 and 98 (inclusive)' echoed.
If the first argument of the script is 99 then 'value is $value' echoed.
If the first argument of the script is 100 then 'value is eq 100' echoed.