Match the following with reference to Unix shell scripts : List-I
Match the following with reference to Unix shell scripts :
List-I
(A) $?
(B) $#
(C) $0
(D) $*
List-II
(i) File name of the current script
(ii) List of arguments
(iii) The number of arguments
(iv) Exit status of last command
Codes : A B C D
Show answerHide answer
Correct answer: (C) iv iii i ii
Explanation
$? : exit status of the last command executed. $# : number of arguments supplied to a script. $0 : file name of the current script. $* : all the arguments (list of arguments). So A-iv, B-iii, C-i, D-ii, i.e. option (c).