Where, or how, is BASH set?

fergus fergus@bonhard.uklinux.net
Thu Jul 26 08:42:00 GMT 2007


Sorry, a very individual query:
I have two portable Cygwins, one on a stick, one on a mobile drive. They 
are both up-to-date though only the one on the drive is a Full 
installation. In all other respects they are not obviously different 
(mounting -buf at the start, un-mounting at the end, etc) and each is 
started in a bash shell. They have identical /etc/group and /etc/passwd. 
After starting the one on the drive, a selection from the output of set 
gives
	BASH=/usr/bin/bash
	HOME=/home/user
	SHELL=/bin/bash
while the one on the stick has
	BASH=/bin/bash
	HOME=/home/user
	SHELL=/bin/bash
I do not understand how this difference (in the definition of BASH) 
arises though I can see it shouldn't matter. It's the only difference in 
the entire output from set on the two devices.
On the drive I can type rxvt <Enter> and immediately get into a rxvt 
shell with $HOME/.bashrc read. This is odd (I would have expected to 
have to type rxvt -e bash <Enter>) but convenient because of the reduced 
typing. On the stick I actually do have to type rxvt -e bash <Enter>; 
the reduced form rxvt <Enter> does not read $HOME/.bashrc and I end up 
in a rxvt terminal with
	BASH=/usr/bin/sh
This, conversely, is expected (but, in comparison, inconvenient).
Regardless of expectedness/ unexpectedness/ convenience, I would really 
like to understand the reason for the difference in behaviours. But I 
really do not want to bother you with loads of individualised corollary 
information (and last time I did I somehow sent it en clair to people's 
mailboxes and got admonished by somebody or other in the good ol' 
imperial manner) ... it would be good if an expert could explain the 
strange difference in the initial setting of BASH; or tell me where or 
how BASH is set so that I could try to explore the difference myself; 
and offer some kind of expert conjecture on whether the difference in 
the setting of BASH could be relevant to the different consequences of 
typing rxvt <no arguments> <Enter> at the bash prompt on the two devices.
Thank you.
Fergus


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list