C++ Programming Question:

Download Job Interview Questions and Answers PDF

How can you tell what shell you are running on UNIX system?

C++ Programming Interview Question
C++ Programming Interview Question

Answer:

You can do the Echo $RANDOM. It will return a undefined variable if you are from the C-Shell, just a return prompt if you are from the Bourne shell, and a 5 digit random numbers if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID.

Download C++ Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How do you find out if a linked-list has an end? (i.e. the list is not a cycle) What is Boyce Codd Normal form?