MCQs > IT & Programming > Unix Shell Script > What is the error in the following shell script code?

Unix Shell Script MCQs

 What is the error in the following shell script code?

1.    until=1

2.    while [ $until -eq 5 ]

3.    do

4.    echo until cannot be used as a variable name

5.    until=`expr $until + 1`

6.    done

Answer

Correct Answer:

Line 1 should be until=$1

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