Re: Where, or how, is BASH set?

2007-07-26 Thread Matthew Woehlke

yitzle wrote:

$ cygpath.exe -w /bin
C:\cygwin\bin

$ cygpath.exe -w /usr/bin
C:\cygwin\bin

/usr/bin is a link to /bin

Can't find where BASH is exported...


JFTR...

   Shell Variables
   The following variables are set by the shell:

   BASH   Expands to the full file name used to invoke this 
instance of bash.


...so it is set by bash itself, not any script.

--
Matthew
So, an astrophysicist, a quantum physicist, and an astrologer walk into 
a bar...



--
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/



Re: Where, or how, is BASH set?

2007-07-26 Thread yitzle

$ cygpath.exe -w /bin
C:\cygwin\bin

$ cygpath.exe -w /usr/bin
C:\cygwin\bin

/usr/bin is a link to /bin

Can't find where BASH is exported...

--
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: Where, or how, is BASH set?

2007-07-26 Thread fergus
In all other respects they are not obviously different 


Sorry, my error. When using the drive, SHELL and HOME are set in the 
Windows environment before starting bash; on the stick, this is not the 
case. Testing confirms this difference in preamble to be the reason for 
the difference in behaviour reported. Sorry to waste your time.

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/



Where, or how, is BASH set?

2007-07-26 Thread fergus

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  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 ) but convenient because of the reduced 
typing. On the stick I actually do have to type rxvt -e bash ; 
the reduced form rxvt  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   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/