From: Charles Seeger on 10 Aug 2010 01:11 Does anyone recall the historical origin of 'command' (and in particular the -v and -V options)? AFAICT, it first appeared in 1992 in POSIX.2 and XPG4. The ksh93 sources and docs say that it was added in 1993 and that it was not included in ksh88 (11/16/1988). So, it seems likely it was added for compliance with the POSIX standard. (NB: 'command' apparently was backported into the Sun ksh88 at some point as a builtin, whereas Sun's Bourne sh relies on the external /usr/bin/command.) So, was 'command' a standards committee invention or was there some prior art upon which it was based? FWIW, the 8th Edition Bourne sh man page mentions the 'builtin' and 'whatis' special commands, but neither 'command' nor 'type'. Furthermore, 'command' was not included in SVID3. TIA, Chuck
From: Janis Papanagnou on 10 Aug 2010 06:30 Charles Seeger schrieb: > Does anyone recall the historical origin of 'command' (and in > particular the -v and -V options)? > > AFAICT, it first appeared in 1992 in POSIX.2 and XPG4. The ksh93 > sources and docs say that it was added in 1993 and that it was not > included in ksh88 (11/16/1988). So, it seems likely it was added > for compliance with the POSIX standard. (NB: 'command' apparently > was backported into the Sun ksh88 at some point as a builtin, > whereas Sun's Bourne sh relies on the external /usr/bin/command.) > > So, was 'command' a standards committee invention or was there > some prior art upon which it was based? (I think it is unlikely that it has been "invented by commitee". Usually POSIX seems to adopt the existing common feature subset, mainly based on ksh[88].) Mind one additional observation; the [new] Kornshell book says that command -v is equivalent to whence , and command -V is equivalent to whence -v . And whence/whence -v where both in ksh88 already. Janis > > FWIW, the 8th Edition Bourne sh man page mentions the 'builtin' and > 'whatis' special commands, but neither 'command' nor 'type'. > Furthermore, 'command' was not included in SVID3. > > TIA, > Chuck >
From: Geoff Clare on 10 Aug 2010 08:48 Charles Seeger wrote: > Does anyone recall the historical origin of 'command' (and in > particular the -v and -V options)? > > AFAICT, it first appeared in 1992 in POSIX.2 and XPG4. The ksh93 > sources and docs say that it was added in 1993 and that it was not > included in ksh88 (11/16/1988). So, it seems likely it was added > for compliance with the POSIX standard. (NB: 'command' apparently > was backported into the Sun ksh88 at some point as a builtin, > whereas Sun's Bourne sh relies on the external /usr/bin/command.) > > So, was 'command' a standards committee invention or was there > some prior art upon which it was based? The standard contains RATIONALE sections which often give some information about the origins of interfaces. For "command" it says: The command utility is somewhat similar to the Eighth Edition shell builtin command, but since command also goes to the file system to search for utilities, the name builtin would not be intuitive. So it looks like it is was invented as an enhanced version of "builtin" with a name change that reflects the new functionality. As for the -v and -V options, the RATIONALE has this to say: The command -v and -V options were added to satisfy requirements from users that are currently accomplished by three different historical utilities: type in the System V shell, whence in the KornShell, and which in the C shell. Since there is no historical agreement on how and what to accomplish here, the POSIX command utility was enhanced and the historical utilities were left unmodified. The C shell which merely conducts a path search. The KornShell whence is more elaborate-in addition to the categories required by POSIX, it also reports on tracked aliases, exported aliases, and undefined functions. -- Geoff Clare <netnews(a)gclare.org.uk>
From: Charles Seeger on 10 Aug 2010 13:01 In article <7eu7j7-06v.ln1(a)leafnode-msgid.gclare.org.uk>, Geoff Clare <geoff(a)clare.See-My-Signature.invalid> wrote: | | The standard contains RATIONALE sections which often give some | information about the origins of interfaces. Thanks, Geoff! I wasn't able to find such an old RATIONALE online. I did find XRAT-6 at opengroup.org, but the very old docs are no longer available there (XPG4.2 seems to be the oldest available). I guess I ought to search at the IEEE site. I did find an old ash man page (undated) that documented 'command' with only the -p option. Perhaps it was tracking early POSIX drafts. Best Regards, Chuck
From: Sven Mascheck on 10 Aug 2010 17:57 Charles Seeger wrote: > Geoff Clare <geoff(a)clare.See-My-Signature.invalid> wrote: > | The standard contains RATIONALE sections which often give some > | information about the origins of interfaces. > > I wasn't able to find such an old RATIONALE online. Geoff was referring to the current standard, not an out-of-date one you were looking for. (And the page for the command command contains the rationale as an additional section.) > I did find an old ash man page (undated) that documented 'command' > with only the -p option. Perhaps it was tracking early POSIX drafts. ash originally didn't know "command" but "bltin". This was changed soon ('91) but the flags were added later (individually on more, now different flavours), e.g. about '98 in dash, or in '03 on NetBSD.
|
Next
|
Last
Pages: 1 2 Prev: Substituting characters Next: find the last file containing a particular string |