All of the positional parameters would be shifted by one position towards right i.e. parameter 2 will have value of parameter 3, parameter 3 will have value of parameter 4 and so on.

, 4.

It would result in an error.

">
MCQs > IT & Programming > Unix Shell Script > Suppose you are writing a shell script that accepts five positional parameters from the terminal. What will be the effect of using statement 'shift 1' in your shell script and then executing the shell script?

Unix Shell Script MCQs

Suppose you are writing a shell script that accepts five positional parameters from the terminal. What will be the effect of using statement "shift 1" in your shell script and then executing the shell script?

Answer

Correct Answer:

The positional parameters would be shifted by one position towards left i.e. parameter 1 will have value of parameter 2, parameter 2 will have value of parameter 3 and so on. 

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