From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f8c9b,9d084fd7a46309da X-Google-Attributes: gidf8c9b,public X-Google-Thread: 102233,9d084fd7a46309da X-Google-Attributes: gid102233,public X-Google-Thread: 1012a6,9d084fd7a46309da X-Google-Attributes: gid1012a6,public X-Google-Thread: f678f,9d084fd7a46309da X-Google-Attributes: gidf678f,public X-Google-Thread: 1020c6,9d084fd7a46309da X-Google-Attributes: gid1020c6,public X-Google-Thread: 1070f0,9d084fd7a46309da X-Google-Attributes: gid1070f0,public X-Google-Thread: fcda7,9d084fd7a46309da X-Google-Attributes: gidfcda7,public X-Google-Thread: 115614,9d084fd7a46309da X-Google-Attributes: gid115614,public From: heath@attica.ColumbiaSC.NCR.COM (Robert Heath) Subject: Re: QUESTION: Is there concensus on where the posix shell should be? Date: 1997/09/17 Message-ID: <341fe71c.0@masters>#1/1 X-Deja-AN: 273276239 Distribution: world Sender: Robert.Heath@columbiasc.ncr.com References: <5u3hc1$2ue$1@newsfeeds.grolier.fr> <5uaa12$982@nebula.mpn.com> Organization: NCR Corp., Columbia SC Newsgroups: comp.unix.shell,comp.unix.admin,comp.unix.osf.misc,comp.unix.questions,comp.unix.sys5.misc,comp.sys.hp.hpux,comp.sys.sun.admin,comp.unix.aix 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 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?!"