Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A simple one...

Status
Not open for further replies.

RajD

Technical User
Aug 23, 2001
53
US
Hi guys,

Just a simple one for you guys, but important for me.

How do I know which shell I am working on?
C-; B-; K- ???

What is the simplest way to identify? Any variable/parameter/setting etc???

I know its a simple one, but don't leave it to others please.

Thanks

Raj
 
The $SHELL environment variable gives you your logon shell, but if you've changed shells during your session it's not accurate. For that, you can do "echo $$" to give you the PID of your current shell, then "ps" to see what shell it is. So "ps | grep $$" will tell you what you want -- now, if you want grep out just the shell name (for a script, for example), there's more work to be done :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top