1.

To know the PID of your current shell, which command will be used?(a) echo $$(b) echo $(c) $SHELL(d) $PATHThe question was posed to me in an international level competition.The query is from Process Basics in portion The Process of Unix

Answer»

The CORRECT ANSWER is (a) ECHO $$

To explain: The shell’s pathname is stored in SHELL, but it’s PID is stored in a SPECIAL variable, $$. To know the PID of our current shell, type



Discussion

No Comment Found

Related InterviewSolutions