1.

How Can You Tell What Shell You Are Running On Unix System?

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 -1 and look for the shell with the highest P(K).

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 -1 and look for the shell with the highest P(K).



Discussion

No Comment Found