T.R | Title | User | Personal Name | Date | Lines |
---|
1361.1 | | SPECXN::DERAMO | Dan D'Eramo | Wed Jan 29 1997 11:43 | 9 |
| Do they also have a file named
.profile
(a shell script which POSIX will run on startup). Perhaps
their .profile is running the test command, and it just picks
up the file named test. in the home directory.
Dan
|
1361.2 | | EWBV05::KUNIYOSHI | | Wed Jan 29 1997 21:26 | 12 |
|
I understood the story.
The customer does not have .profile in home directory.
But,/etc/profile is executed when entering POSIX and /etc/profile
contains "if" statement. It seems that "if" statement is actually
executes as "test" command.
So "test.;" is executed when entering to posix.
Thanks,
Makito
|
1361.3 | [ ] | MUCTEC::BECKER | Hartmut B., VMS & Languages, Munich | Thu Jan 30 1997 04:21 | 26 |
| > contains "if" statement. It seems that "if" statement is actually
> executes as "test" command.
It's not the if, it's the ' [ ... ] '. Man pages for test explain that the
brackets are an alternate form for test, which normally lives in /bin.
Probably you know how to work around this problem:
From /etc/profile:
export \
SHELL=/bin/sh \
PS1='psx> '
PATH=.:/usr/bin:/bin
if [ -f /usr/dce/bin/dce_defs.sh ]
then
. /usr/dce/bin/dce_defs.sh
fi
The current directory . is first in the search path. If you move it at the
end /bin/test should be used in the 'if'. There is a drawback. If you have
programs with the same name as programs in /usr/bin or /bin the modified
search path will find the system provided programs first and start them. To
run your version of these programs the prefix ./ is necessary.
Hartmut
|