Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Identifying the NetBSD shell
Date: Mon, 21 Mar 2016 10:28:21 +0100
From: Kamil Rytarowski <n54%gmx.com@localhost>
Message-ID: <56EFBEB5.7020502%gmx.com@localhost>
| mksh(1) defines MKSH_VERSION.
That's interesting, they must have changed (relatively recently - as in
within the last year or so) - the version I have defines KSH_VERSION ...
$ echo $KSH_VERSION
@(#)MIRBSD KSH R50 2014/10/07
and not MKSH_VERSION
But it does suggest that the name of the variable may be more important
than its content, as you suggest.
| I suggest to define SH_VERSION with value "NetBSD".
That might be a little too course, but certainly is a possibility.
| Precise version
| (if needed) is retrievable with what(1) and ident(1) (or strings(1)
| and grep(1) or similar).
And that might be a little too precise - fine when what you want to
know is whether some specific bug is fixed, but if a script wants to
know if it can safely redirect file descriptors >= 10 (answer for NetBSD
right now is definitely no) that is a little difficult to embed in the
script.
| - From my experience, people mostly detect whether *_VERSION is
| available, without parsing their values.
I agree.
| While there, I would reset ksh(1) to "NetBSD" as the current value
| ("@(#)PD KSH v5.2.14 99/07/13.2") has no meaning.
That would probably be a good idea. It is certainly kind of dated, and
I am sure that ksh(1) has had some changes/fixes in the past 16 years.
kre
ps: I had an off-list vote for NETBSD_SHELL as the var name.
Home |
Main Index |
Thread Index |
Old Index