delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/01/27/14:48:51

From: tfisher AT teamparadigm DOT com (Tim Fisher)
Subject: /etc/profile ignored; other strangeness
27 Jan 1998 14:48:51 -0800 :
Message-ID: <003b01bd2b52$c90b5e40$b2e2e3d0.cygnus.gnu-win32@caliban.teamparadigm.com>
Mime-Version: 1.0
To: <gnu-win32 AT cygnus DOT com>

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?

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?

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?

--Tim Fisher

-
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".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019