Re: [Bash-announce] source of tar, gzip, gunzip, bzip, bunzip2 and compress ???
am not quite sure, if this is the right site for this question. [EMAIL PROTECTED] or bug-bash@gnu.org would have been better, but your mistake is understandable. Cc-ing bug-bash here, since this is certainly not an announcement. Where e.g. I can obtain the source code of the commands like following: tar, gunzip, compress, and gzip ??? You can download the sources for most GNU packages (including those) from http://ftp.gnu.org/gnu. In the bash-source code, the commands (about 3300 bash commands) are not included with their own source code ??? They are not bash commands. They are their own packages. Hope this helps, [EMAIL PROTECTED]
Re: PATH value doesn't get updated
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. > > 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." Yes. To be pedantic about things I didn't say those were the only ways and I did also mention --login in my mail. > Better way to check if shell is login is: > > $ shopt | grep login_shell > login_shell on That will tell if bash *is* a login shell but that wasn't the question that I was asking. I was asking if bash was being instructed to be a login shell using normal login conventions. Seeing that $0 doesn't start with a dash says that it wasn't. Therefore bash is behaving normally. If you explicitly log into the host again such as with 'ssh localhost' then you should see that sshd sets $0 to start with a dash. Then bash knows that it is a login shell. Then bash sources the login environment files. It is just the unfortunate default configuration of GDM/KDM that doesn't start up X sessions with some parent shell as a login shell and therefore (by default) .bash_profile isn't getting sourced. The scripts don't cause personal environments to be sourced. This is even an FAQ for KDE. Different GNU/Linux distros have taken steps to address this issue by different methods and some have done nothing sticking to the default behavior. Debian and Ubuntu have not modified this and are using the default behavior while Red Hat and SuSE have both taken *different* actions to make login environments be sourced. Plus there are several classic Unix environments other than the new GNU/Linux ones that do things the old ways. Having many possibilities makes this a messy problem to describe, document and address. Bob
Re: PATH value doesn't get updated
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
Re: PATH value doesn't get updated
В Пнд, 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.