Peter Volkov wrote:
> 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.
>
> Ac
Peter Volkov schrieb:
Better way to check if shell is login is:
$ shopt | grep login_shell
login_shell on
You don't even have to call an external program:
[[ $(shopt -p login_shell) == *-s* ]]
Regards,
Bernd
--
Bernd Eggink
[EMAIL PROTECTED]
http://sudrala.de
В Пнд, 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.
Ac
Carl Wenrich wrote:
> I just log into the box that appears on the standard ubuntu
> startup. I enter my username and password, then the desktop comes
> up.
You are using GDM (GNOME Display Manager) then. In which case it
won't automatically start up shells as login shells. It is a quirk of
how t
I just log into the box that appears on the standard ubuntu startup. I enter my
username and password, then the desktop comes up.
I see now that the .bash_profile isn't being sourced (I thought it was
according to what I've been able to pick up on the web). If I source it
manually, the $PATH ge
Carl Wenrich wrote:
> echo $0 gives me "bash"
> echo $- gives me "himBH"
Then bash hasn't been invoked as a login shell and therefore isn't
instructed to source the .bash_profile.
> If it is not a login shell then to suggest improvements it would be
> necessary to know the type of system you are
echo $0 gives me "bash"
echo $- gives me "himBH"
Bob Proulx <[EMAIL PROTECTED]> wrote: Carl Wenrich wrote:
> Bob Proulx wrote:
> > Did you log in after having made that change? Was bash invoked as
> > an interactive login shell so that it would read that file?
> >
> > echo $0
> > echo $-
>
>
Carl Wenrich wrote:
> Bob Proulx wrote:
> > Did you log in after having made that change? Was bash invoked as
> > an interactive login shell so that it would read that file?
> >
> > echo $0
> > echo $-
>
> Yes. I (1) made the change to .bash_profile, then (2) restarted the
> machine, then (3)
Yes. I (1) made the change to .bash_profile, then (2) restarted the machine,
then (3) logged in again. When I echo $PATH the /opt/lampp/bin is not included.
Bob Proulx <[EMAIL PROTECTED]> wrote: carlwenrich wrote:
> I put this in my .bash_profile:
>
> PATH=$PATH:/opt/lampp/bin
> export PATH
>
>
carlwenrich wrote:
> I put this in my .bash_profile:
>
> PATH=$PATH:/opt/lampp/bin
> export PATH
>
> but when I "echo $PATH" it doesn't include the /opt/lampp/bin.
The .bash_profile is sourced by bash when it is invoked as an
interactive login shell. Therefore you would need to log in after
hav
I put this in my .bash_profile:
PATH=$PATH:/opt/lampp/bin
export PATH
but when I "echo $PATH" it doesn't include the /opt/lampp/bin.
--
View this message in context:
http://www.nabble.com/PATH-value-doesn%27t-get-updated-tp17189469p17189469.html
Sent from the Gnu - Bash mailing list archive at
11 matches
Mail list logo