1.

Which of the following is not a system defined variable?(a) $PATH(b) $HOME(c) $SHELL(d) $cdThis question was posed to me in a job interview.The doubt is from Command Substitution and Shell Variables topic in section The Shell of Unix

Answer»

The correct answer is (d) $cd

For explanation: PATH is the shell variable which stores the LIST of directories that the shell searches for locating commands. HOME prints our home directory while SHELL prints the absolute pathname of our LOGIN shell. cd is a command which is used for changing directories or moving through file HIERARCHY.



Discussion

No Comment Found

Related InterviewSolutions