On Dec 6 2006 19:17, Thomas Hertweck wrote:
Date: Wed, 06 Dec 2006 19:17:03 +0000 From: Thomas Hertweck
To: opensuse@opensuse.org Subject: Re: [opensuse] Which Shell do I Have? Anders Johansson wrote:
On Tuesday 05 December 2006 21:15, Thomas Hertweck wrote:
Hmmm... I would like to point out that this will (most likely) only print the default shell which is set in /etc/passwd (which should be fine in Kai's situation). If the current shell needs to be determined, it's better to use "echo $0".
ls -l /proc/$$/exe
Could you please elaborate why you came up with this solution? I think this is not portable - for instance, our HP box here has no procfs, so your solution fails. An "echo $0" should always work (as far as I know).
You forgot this case: execl("/bin/bash", "foobar", NULL); -`J' -- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org