* QUESTION: Is there concensus on where the posix shell should be?
@ 1997-08-27 4:00 Christopher Rath
1997-08-28 4:00 ` Eric Levenez
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Rath @ 1997-08-27 4:00 UTC (permalink / raw)
On different versions of SysV, the posix shell is put in different
locations. We're considering installing a softlink on every system
here, so that shell scripts can refer to the posix shell and always
find it in the same place (no matter what vendor's system is used).
On HP-UX 10.x, the posix shell is /usr/bin/sh and with a softlink to
/usr/bin/posix/sh.
On Solaris 2.x, the posix shell is found at /usr/bin/ksh with a
softlink to /usr/xpg4/bin/sh.
On Motorola AIX 4.1, the posix shell is only found at /usr/bin/ksh.
What is the concensus on where a posixshell softlink should reside? One
of the alternatives I've tossed around is /opt/posix/sh as a pointer to
the posix shell. What do others think?
Christopher
=== Christopher Rath === crath@nortel.ca === (613) 765-3141 ===
Northern Telecom Ltd. |
Box 3511, Station `C' | ``Hydrogen is a colourless, odourless
Ottawa, ON K1Y 4H7 | gas which, given enough time, turns
FAX: (613) 763-4101 | into people.'' --- Henry Hiebert
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: QUESTION: Is there concensus on where the posix shell should be?
1997-08-27 4:00 QUESTION: Is there concensus on where the posix shell should be? Christopher Rath
@ 1997-08-28 4:00 ` Eric Levenez
1997-08-30 4:00 ` Stephen Harris
0 siblings, 1 reply; 4+ messages in thread
From: Eric Levenez @ 1997-08-28 4:00 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1347 bytes --]
Christopher Rath <crath@nortel.ca> wrote:
> On different versions of SysV, the posix shell is put in different
> locations. We're considering installing a softlink on every system
> here, so that shell scripts can refer to the posix shell and always
> find it in the same place (no matter what vendor's system is used).
>
> On HP-UX 10.x, the posix shell is /usr/bin/sh and with a softlink to
> /usr/bin/posix/sh.
>
> On Solaris 2.x, the posix shell is found at /usr/bin/ksh with a
> softlink to /usr/xpg4/bin/sh.
>
> On Motorola AIX 4.1, the posix shell is only found at /usr/bin/ksh.
On UnixWare 2.12, it is /u95/bin/sh.
> What is the concensus on where a posixshell softlink should reside? One
> of the alternatives I've tossed around is /opt/posix/sh as a pointer to
> the posix shell. What do others think?
Every vendor is going his way. You can't find a common location for
the shell. And you can find different version the posix shell in the
same machine.
--
--------------------------------------------------------------------
�ric L�v�nez "Felix qui potuit rerum cognoscere causas"
mailto:levenez@club-internet.fr Publius Vergilius Maro,
(NeXTMail, MIME) Georgica, II-489
--------------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: QUESTION: Is there concensus on where the posix shell should be?
1997-08-28 4:00 ` Eric Levenez
@ 1997-08-30 4:00 ` Stephen Harris
1997-09-17 4:00 ` Robert Heath
0 siblings, 1 reply; 4+ messages in thread
From: Stephen Harris @ 1997-08-30 4:00 UTC (permalink / raw)
Eric Levenez (levenez@club-internet.fr) wrote:
: Christopher Rath <crath@nortel.ca> wrote:
: > On HP-UX 10.x, the posix shell is /usr/bin/sh and with a softlink to
: > /usr/bin/posix/sh.
: >
: > On Solaris 2.x, the posix shell is found at /usr/bin/ksh with a
: > softlink to /usr/xpg4/bin/sh.
Warning: /usr/bin/ksh on Solaris 2.x is in fact ksh88i
If you are willing to use ksh, then /usr/bin/ksh on HP-UX 10.x is the
same (well, it's only ksh88 and not ksh88i, but close enough).
The posix shell on HP-UX is not quite the same as ksh - it's ksh with
some hacks (according to the HP-UX support center).
: Every vendor is going his way. You can't find a common location for
: the shell. And you can find different version the posix shell in the
: same machine.
I just use /bin/ksh and hope it works :-)
--
rgds
Stephen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: QUESTION: Is there concensus on where the posix shell should be?
1997-08-30 4:00 ` Stephen Harris
@ 1997-09-17 4:00 ` Robert Heath
0 siblings, 0 replies; 4+ messages in thread
From: Robert Heath @ 1997-09-17 4:00 UTC (permalink / raw)
I don't think there's a consensus for a standard directory in which the
POSIX shell resides.
In the Single UNIX Specification (a.k.a. UNIX95 or XPG4 UNIX) the exact
path of the POSIX shell is not specified. In fact, the standard
typcally avoids specification of complete pathnames altogether.
Here are two possible solutions for finding the standard shell though:
1) If your system has a "getconf" utility then type
getconf CS_PATH
or
getconf PATH
which produces a colon-separated list of directories, one of which
should contain the standard shell, named "sh".
2) At the `C' language programming interface, you can use
#include <unistd.h>
char buffer[2048]; /* more elegant solutions for sizing are possible */
confstr(_CS_PATH, buffer, sizeof(buffer));
On return, buffer[] contains the colon-separated list of directories
one of which should contain the standard shell, named "sh".
--
Best,
Robert Heath
"My Net... My Net... What have they done to my beautiful Internet?!"
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1997-09-17 4:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-08-27 4:00 QUESTION: Is there concensus on where the posix shell should be? Christopher Rath
1997-08-28 4:00 ` Eric Levenez
1997-08-30 4:00 ` Stephen Harris
1997-09-17 4:00 ` Robert Heath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox