1.

Which one of the following command will display the name of the shell we are working on?(a) echo shell(b) echo $(c) echo $SHELL(d) echo $$This question was addressed to me in examination.Question is from Shell Basics in portion The Shell of Unix

Answer»

Correct OPTION is (c) echo $SHELL

Explanation: When we run the command echo $SHELL, it will DISPLAY the current shell on which we are WORKING. The output of the command is the absolute pathname of the shell’s command file. If $SHELL EVALUATES to/bin/BASH, our login shell is bash.



Discussion

No Comment Found

Related InterviewSolutions