MCQs > IT & Programming > Unix Shell Script > What is the error in the following program?

Unix Shell Script MCQs

What is the error in the following program?

1.    x=10

 2.    if [ x -ge 2 ]

3.    then

4.        echo $x

5.    fi

Answer

Correct Answer:

Line 2 should be if [ $x -ge 2 ]

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Unix Shell Script Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Unix Shell Script Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it