Mailinglist Archive: opensuse (2835 mails)
| < Previous | Next > |
Re: [opensuse] Which Shell do I Have?
- From: Anders Johansson <andjoh@xxxxxxxxxx>
- Date: Wed, 6 Dec 2006 21:04:27 +0100
- Message-id: <200612062104.27868.andjoh@xxxxxxxxxx>
On Wednesday 06 December 2006 20:17, Thomas Hertweck wrote:
> 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 wasn't aware that I had to justify my solutions
> An "echo $0" should always work (as far as I know).
It doesn't work from within a shell script, since parameter 1 then is set to
the name of the shell script
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
> 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 wasn't aware that I had to justify my solutions
> An "echo $0" should always work (as far as I know).
It doesn't work from within a shell script, since parameter 1 then is set to
the name of the shell script
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |