bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PATH value doesn't get updated


From: Peter Volkov
Subject: Re: PATH value doesn't get updated
Date: Sun, 18 May 2008 18:38:33 +0400

В Пнд, 12/05/2008 в 17:02 -0600, Bob Proulx пишет:

> The $0 is the name used to invoke the shell.  If it starts with a '-'
> then this is used to instruct the shell that it is a login shell.  The
> second variable $- is the flags set to the shell.  The 'i' for
> interactive should be in there.

Actually that's not exactly true. It's possible to start bash as login
shell but - will be absent. Quoting relevant part of manual:

"A _login_ shell is one whose first character of argument zero is `-',
or one invoked with the `--login' option."

Better way to check if shell is login is:

 $ shopt | grep login_shell
login_shell     on

-- 
Peter.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]