From: earnie_boyd AT hotmail DOT com (Earnie Boyd) Subject: Re: /etc/profile ignored; other strangeness 28 Jan 1998 06:09:12 -0800 Message-ID: <19980128133108.12943.qmail.cygnus.gnu-win32@hotmail.com> Content-Type: text/plain To: tfisher AT teamparadigm DOT com Cc: gnu-win32 AT cygnus DOT com >From: "Tim Fisher" >To: >Subject: /etc/profile ignored; other strangeness >Date: Tue, 27 Jan 1998 13:38:37 -0500 > >I have three questions, but they're all sort of related so here goes: > >1) Seems like bash ignores /etc/profile, so I have to explicitly source it from >the /etc/bashrc file. I don't have to do this in Linux. Is this by design, or >am I doing something wrong here? You should read the bash.info file. bash -login will execute the /etc/profile file on startup. However, with the -login switch it will not execute the .bashrc file so, you will need to source it in your /etc/profile file. > >2) My PS1 variable is set to PS1="[\u@\h \W]\\$ " but when bash first starts >up, the \W defaults to nil. It will update only if I change directories, and >then I get some strange behavior. This occurs only after first starting up >bash. After 'cd'ing around a bit, it settles down: > >[Administrator AT CALIBAN ]$ cd usr >[Administrator AT CALIBAN usr]$ pwd >./usr >[Administrator AT CALIBAN usr]$ cd incoming >[Administrator AT CALIBAN /incoming]$ pwd >/incoming >[Administrator AT CALIBAN /incoming]$ cd /usr >[Administrator AT CALIBAN /usr]$ cd incoming >[Administrator AT CALIBAN incoming]$ pwd >/usr/incoming >[Administrator AT CALIBAN incoming]$ > >BTW, I have two partitions, one is mounted on /usr, the other on /. Both >filesystems have a root directory called `incoming', so if my current directory >is /usr, then a `cd incoming' should get me to /usr/incoming, not /incoming. >What is going on here? I've noticed this also, it is a bug. This will happen with all directory resolution commands. I have a /src and a /dir1/dir2/src directory. If you "cd /dir1/dir2/src; find . -name somefile" the find command will also search the /src directory for the file. To workaround this particular problem if you use `pwd` instead of \W that it will work. Be sure to escape the backquote when setting the variable. > >3) As you can see above, the hostname of my system is printed in all caps for >some reason. I placed in my /etc/profile the following line: > >export HOSTNAME=`/NT/system32/hostname` > >which works fine on the command line and returns a lower-case version of my >hostname. (The cygwin32 version of hostname returns the hostname in all caps--I >don't know why.) Bash is supposed to use $HOSTNAME for the \h in $PS1. Again, >what is going on here? Don't know about this one. To workaround: instead of \h use `echo $HOSTNAME` > >--Tim Fisher > - \\||// ---o0O0--Earnie--0O0o---- -earnie_boyd AT hotmail DOT com- ------ooo0O--O0ooo------- Check out these great gnu-win32 related sites: ftp://ftp.cygnus.com/pub/gnu-win32/latest/ (ftp site) http://www.cygnus.com/pubs/gnupro/ (Comercial Page) http://www.cygnus.com/misc/gnu-win32/ (Project Page) http://www.cygnus.com/ml/gnu-win32 (Mail Archives) http://www.itribe.net/virtunix/winhelp-man-pages/ (HTML Man Pages) http://www.lexa.ru/sos (Sergey Okhapkin) ftp://www.lexa.ru/pub/domestic/sos/ (Sergey's ftp site) http://www.fu.is.saga-u.ac.jp/~colin/gcc.html (Colin Peters) http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ (Mumit Khan) http://gnu-win32.paranoia.ru (Chuck Bogorad's ports) ftp://ftp.deninc.com/pub (Den Internet Services - US mirror and ports) http://www.bestweb.net/~aka/gnu-win32/ (GNU-Win32 Bash Configuration) ______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".