top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

When do we run a shell in the UNIX system? How will you tell which shell you are running?

+1 vote
255 views
When do we run a shell in the UNIX system? How will you tell which shell you are running?
posted Jan 27, 2015 by Anwar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

To check this you can simply do the Echo $RANDOM.

The results will be:

- Undefined variable if you are from the C-Shell, 

- A return prompt if you are from the Bourne shell, 

- A 5 digit random number if you are from the Korn shell. You could also do a ps -l and look for the shell with the highest PID.
answer Jan 28, 2015 by Mohammed Hussain
...