top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

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

+1 vote
48 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
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...