Unix Shell - how find out what shell i am currently on

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > March 2006 > how find out what shell i am currently on





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author how find out what shell i am currently on
Mahurshi Akilla

2006-03-16, 5:53 pm

is there a way to find out what shell i am currently on (other than
using "top" and looking up)

Mahurshi Akilla

Ed Morton

2006-03-16, 5:53 pm

Mahurshi Akilla wrote:

> is there a way to find out what shell i am currently on (other than
> using "top" and looking up)
>
> Mahurshi Akilla
>


echo "$SHELL"

Ed.
Bill Marcum

2006-03-16, 5:53 pm

On 16 Mar 2006 10:31:31 -0800, Mahurshi Akilla
<mahurshi@gmail.com> wrote:
> is there a way to find out what shell i am currently on (other than
> using "top" and looking up)
>
> Mahurshi Akilla
>

This question has been discussed many times. I suggest you use Google
to do what it does best. However, instead of top, try "ps $$".


--
BOFH excuse #355:

Boredom in the Kernel.
Barry Margolin

2006-03-16, 5:53 pm

In article <F7OdnTIG8v6aLITZRVn-ig@comcast.com>,
Ed Morton <morton@lsupcaemnt.com> wrote:

> Mahurshi Akilla wrote:
>
>
> echo "$SHELL"


Wrong. That tells you your default shell, not your current shell.

barmar $ ps -p $$
PID TT STAT TIME COMMAND
1587 p1 Ss 0:00.06 /bin/bash --noediting -i
barmar $ ksh
$ echo $SHELL
/bin/bash
$ ps -p $$
PID TT STAT TIME COMMAND
2244 p1 S 0:00.04 ksh
$

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Michael Paoli

2006-03-17, 7:50 am

Mahurshi Akilla wrote:
> is there a way to find out what shell i am currently on (other than
> using "top" and looking up)

GIYF, excellent answers abound, e.g.:
Message-ID: <slrnc1tl6j.42.stephane.chazelas@spam.is.invalid>
http://groups.google.com/group/comp...de=source&hl=en

Christopher W Aiken

2006-03-17, 5:54 pm

On 16 Mar 2006 10:31:31 -0800, "Mahurshi Akilla" <mahurshi@gmail.com>
wrote:

>is there a way to find out what shell i am currently on (other than
>using "top" and looking up)
>
>Mahurshi Akilla


ps $$
echo $0

-=[cwa]=-
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com