Sven Guckes version-crusade@guckes.net ©1995-2003

Latest change: Wed Oct 29 06:00:00 CET 2003

Version Info and Numbers - The Crusade

"Info inside!": Information on the current version should also be available from within the programs. On Apple Macintoshs many programs identify via the "About..." command just under the "Apple Menu" which can be quite helpful.

However, many programs do not identify at all. So you can never be sure which version you are using. Not everyone knows where the source files can be found and looking at the program's date can be quite misleading because this information can easily be changed.

Many programs do not identify properly (ie show their development version number) thus making it hard for everyone to use them.

This can be a nightmare on systems used by many people who depend on using both an old version with its knows bugs and the latest development version where the bugs should have been fixed.

There would be far less confusion if all programs had a unique way to identify themselves properly.

Summary: This page is asking all developers to include a version number and release date with every program, and to add standard request parameters ("--help" and "--version") to request this information. -- This page also gives info on how to request this information from some standard programs which probably shows how hard it can be to remember all those techniques.

Developers: Please include a command line option/switch to show the name+version+realease-date of your program. Even better, add the info on a homepage and an address of the maintainer.

Admins and users: Do not install or use programs which do not identify properly!

Thankyou!


An outline to better version info

"Easier said than done", you say. "How shall this look like then?"

Here's an example of what I envision for programs:

        $ program --version
        program 1.1.1 [1998-07-14]
        http://www.guckes.net/program/
         ftp://ftp.guckes.net/program/
        (c) Sven Guckes 1998  program@guckes.net
        For more info see "program --help".

The first line shows three items: The program name, its version number, and the release date (in YYYY-MM-DD format). All items are given as separate words which allows for easy extraction (most humans and programs separate words by whitespace.) Second and third line gives the URLs of its homepage and its (main) download site. Next line shows the name of the author and his contact address (usually an email address or a webpage with more info on how to contact him). A hint to the copyright should also be added. And the last line gives a hint for more help.


FAQ: How do I let program show its version?

A look at some (popular) programs and how to get the version info from them.

agrep antiword | bind | emacs | fetchmail | gv | links | lynx | lsof | mc | perl | pine | postfix | procmail | rxvt | sendmail | ssh | tidy | wget | zsh


abook - text-based address book program

abook does not have an extra option to show the version info. but it gives the info on "--help":

$ abook --help | head -1
abook v 0.4.17

agrep - approximate grep

AGREP does not identify at all. BAD!

$ agrep --
agrep: illegal option  --
usage: agrep [-#cdehiklnpstvwxBDGIS] [-f patternfile] pattern [files]

summary of frequently used options:
-#: find matches with at most # errors
-c: output the number of matched records
-d: define record delimiter
-h: do not output file names
-i: case-insensitive search, e.g., 'a' = 'A'
-l: output the names of files that contain a match
-n: output record prefixed by record number
-v: output those records containing no matches
-w: pattern has to match as a word, e.g., 'win' will not match 'wind'
-B: best match mode. find the closest matches to the pattern
-G: output the files that contain a match

As you can see, the options "ekpstxDIS" are not explained in this output. The manual, however, explains them all - even option 'y' which is not even mentioned in the manual's SYNOPSIS section but later on in the manual.

Anyway, the timestamp on agrep-2.04's README is 1992-04-15 - and it does not seem to have changed this then.


antiword - show the text and images of MS Word documents

$ antiword-0.33 -h
        Name: antiword
        Purpose: Display MS-Word files
        Author: (C) 1998-2002 Adri van Os
        Version: 0.33  (05 Jul 2002)
        Status: GNU General Public License
        Usage: antiword [switches] wordfile1 [wordfile2 ...]
        Switches: [-t|-p papersize][-m mapping][-w #][-i #][-Ls]
                -t text output (default)
                -p <paper size name> PostScript output
                   like: a4, letter or legal
                -m <mapping> character mapping file
                -w <width> in characters of text output
                -i <level> image level (PostScript only)
                -L use landscape mode (PostScript only)
                -s Show hidden (by Word) text

In case you are wondering - ANTIWORD does all this indenting itself. And, no, it does not document that you will get help with "-h".

Here's my version:

$ antiword-0.34 -v
antiword 0.34 [2004-01-01]

$ antiword-0.34 -h
antiword 0.34 [2004-01-01]
Purpose:     Convert MS-Word DOC files to text.
Author:      (C) 1998-2002 Adri van Os
Status:      GNU General Public License
Usage:       antiword [switches] wordfile1 [wordfile2 ...]
Switches:
-h           show only this help text, then quit.
-i level     image level (PostScript only)
-m file      specify the character mapping file
-p papersize [a4|letter|legal] (produces PostScript output)
-s           show text hidden within DOC file
-t           text output (default)
-v           show only the version and release date, then quit.
-w width     maximum number of characters in text output
-L           use Landscape mode (PostScript only)
Example:     antiword thesis.doc > thesis.txt

By the way, i use antiword implicitly to have attached DOC files converted to text automatically and then have them viewed "inline" with the text parts of email. So when I reply to such an email then the converted doc file is just text and gets quoted, too, so i can simply add my comments without the need for a conversion at all.


bind

Format: dig txt chaos version.bind @servername

Info by Brion Moss - thanks!

Example:
$ dig txt chaos version.bind @gnu.in-berlin.de

; <<>> DiG 9.2.3 <<>> txt chaos version.bind
@gnu.in-berlin.de
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 61330
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0,
ADDITIONAL: 0

;; QUESTION SECTION:
;version.bind.                  CH      TXT

;; ANSWER SECTION:
VERSION.BIND.           0       CH      TXT
"8.4.3-NOESW"

;; Query time: 0 msec
;; SERVER: 192.109.42.4#53(gnu.in-berlin.de)
;; WHEN: Thu Feb  5 13:23:51 2004
;; MSG SIZE  rcvd: 66

and here's how to extract that info from the "VERSION" line:

$ dig txt chaos version.bind @gnu.in-berlin.de | \
  sed -n '/VERSION/{s/^.*\t"\(.*\)"/\1/;p}'
8.4.3-NOESW

emacs

Not all versions of Emacs have the "--version" startup option. But you can use the internal command with the "batch" opton:
        emacs -batch --eval='(print (emacs-version))'
Anyway, emacs-20.X does have "--version":
$ emacs --version
GNU Emacs 20.3.1
Copyright (C) 1998 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
Also, emacs-19.29.1 seems to have it. Is this the first version of emacs that has it?


gpg - GNU pgp

$ gpg --version
gpg (GnuPG) 1.0.6
Copyright (C) 2001 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.

Home: ~/.gnupg
Supported algorithms:
Cipher: 3DES, CAST5, BLOWFISH, RIJNDAEL, RIJNDAEL192, RIJNDAEL256, TWOFISH
Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA, ELG
Hash: MD5, SHA1, RIPEMD160

fetchmail - fetch mail from a POP, IMAP, ETRN, or ODMR-capable server

$ fetchmail --help
usage:  fetchmail [options] [server ...]
  Options are as follows:
[50 lines of options]

So instead of an error message you get the usage info with a list of *all* options. well, this just *might* be useful, but a short info about how to request help might be nicer.

$ fetchmail --foobar
/usr/bin/fetchmail 5.9.11+NTLM+SDPS+NLS [YYYY-MM-DD]  identify with pathname version number and release date
fetchmail: E123 invalid option "--foobar"             print error number and description
see "fetchmail --help" for more info.                 suggest getting help with the proper option

so now we should know that we need to get help with the option "--help":

$ fetchmail --help
usage:  fetchmail [options] [server ...]
  Options are as follows:
[50 lines of options]

now, let's check for the option which gives us the version info:

$ fetchmail --help | grep version
  -V, --version     display version info

so it's either "-V" for short or "--version" as we would expect it to be with a GNU program.

$ fetchmail --version
This is fetchmail release 5.9.11+NTLM+SDPS+NLS
Linux lin207 2.4.21-ac1 #3 SMP Thu Jun 19 17:59:50 CEST 2003 i686 unknown
Taking options from command line and /home/robinson/emailer/guckes/.fetchmailrc
Idfile is /home/robinson/emailer/guckes/.fetchids
Fetchmail will forward misaddressed multidrop messages to guckes.
Options for retrieving from guckes@gmx.net@pop.gmx.net:
  True name of server is pop.gmx.net.
  Protocol is POP3.
  All available authentication methods will be tried.
  Server nonresponse timeout is 300 seconds (default).
  Default mailbox selected.
  Only new messages will be retrieved (--all off).
  Fetched messages will not be kept on the server (--keep off).
  Old messages will not be flushed before message retrieval (--flush off).
  Rewrite of server-local addresses is enabled (--norewrite off).
  Carriage-return stripping is enabled (stripcr on).
  Carriage-return forcing is disabled (forcecr off).
  Interpretation of Content-Transfer-Encoding is enabled (pass8bits off).
  MIME decoding is disabled (mimedecode off).
  Idle after poll is disabled (idle off).
  Nonempty Status lines will be kept (dropstatus off)
  Delivered-To lines will be kept (dropdelivered off)
  Messages will be delivered with "/usr/bin/procmail".
  Recognized listener spam block responses are: 571 550 501 554
  Single-drop mode: 1 local name(s) recognized.
  No UIDs saved from this host.

Lots of info there - but a lot more than just the version number and release date..


gv - PostScript and PDF previewer

gv gives the version number with "-v" which is quite different from many other programs:

$ gv -v
gv 3.5.8 (debian)

Even worse, it refuses to identify unless it can "open the display":

$ unset DISPLAY
$ gv -v
gv: Unable to open the display.

links - text mode web browser

Links does have start option names - but it hides them after just *one* dash:
$ links -version
Links 0.96pre2

lsof - list open files

$ lsof -v
lsof version information:
    revision: 4.48 -- find the latest revision at:
        ftp://vic.cc.purdue.edu/pub/tools/unix/lsof
    configuration info: /proc-based
    constructed: Thu Feb 3 22:44:56 CET 2000
    constructed by and on: jim@dodo2
    compiler: cc
    compiler version: 2.95.2 19991109 (Debian GNU/Linux)
    compiler flags: -DLINUXV=22000 -DGLIBCV=201 -DHASIPv6 -DLSOF_VSTR="2.2" -O
    loader flags: -L./lib -llsof
    system info: Linux dodo2 2.2.14 #1 Sat Jan 15 17:44:10 CET 2000 i686 unknown

lynx - text mode web browser

$ lynx -version


Lynx Version 2.8.4dev.10 (21 Sep 2000)
Built on solaris2.6 Oct  7 2000 01:34:22

Copyrights held by the University of Kansas, CERN, and other contributors.
Distributed under the GNU General Public License.
See http://lynx.browser.org/ and the online help for more information.

No, I do not know hat the extra empty lines are for. ;-)


mc - midnight commander

The Midnight Commander (mc) does identify with "--version" - and it does so quite verbosely;

$ mc --version
GNU Midnight Commander 4.6.0
Virtual File System: tarfs, extfs, cpiofs, ftpfs, fish
With builtin Editor
Using system-installed S-Lang library with terminfo database
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support

I suppose that many user find it nice to be reading a non-cryptic version info.


perl - Practical Extraction and Report Language

perl 5.004_01 only understood "-v", but now perl 5.005_03 understands "--version":

$ perl --version

This is perl, version 5.005_03 built for i386-linux

Copyright 1987-1999, Larry Wall

Perl may be copied only under the terms of either the Artistic License or
the GNU General Public License, which may be found in the Perl 5.0 source
kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.
Hooray for perl! :-)


pine - console mailer and newsreader

$ pine-4.20 -h | grep version

$ pine-4.33 -h | grep version
 -v             Version - show version information

$ pine-4.50 -h | grep version
 -v             Version - show version information
 -version       Version - show version information

As you can see, pine-4.20 did not not have a startup option to identify on the command line at all. Then pine-4.33 at least had "-v" - and now pine-4.50 can also identify with "-version".

$ pine -v
Pine 4.44 built Thu May 9 04:29:49 CEST 2002 on simpel

So with the "old" versions you had to start Pine to see its version number. And you certainly did not want to do this when you have another (instance of your) mailer access your mailbox...

My workaround for the old versions was to fool pine into believing that /dev/null was its mailbox:

$ MAIL=/dev/null ; export MAIL
$ pine

Then it would start up on an empty folder and I could simply take the version number from pine's display:

  PINE 4.44   MAIN MENU [...] Folder: (CLOSED)  No Msgs

However, pine *still* opens /var/mail/$USER - and even when you have made *no* changes at all then the mailbox *will* get modified. that's one of the reasone why I do not trust pine.

anyway, my guess is that pine probably will not support "long option name" in the GNU sense, ie "--version" with *two* dashes. Then again, Pine is not Free Software - note the "UW(tm)" on its display!


postfix

Postfix's version number is the release date (I think).

Postfix 20000924

procmail - mail filter

$ procmail -v | head -1
procmail v3.22 2001/09/10

rxvt - color terminal

There is no special switch to request the version number with rxvt. Bad. However, the version info is displayed with both help requests and with errors on startup. The command rxvt -help shows part of the help, and rxvt --help is supposed to show help about "long-options".

You can get rxvt's version number by using the option "-help":

$ rxvt -help |& head -5
Rxvt v2.7.7 - released: 09 AUGUST 2001
Options: scrollbars=NONE,.Xdefaults
Usage: rxvt [options] [-e command args]
Suggestion: Make rxvt show the version number like this:

$ rxvt -V
rxvt 2.4.5 (utmp,XGetDefaults)

$ rxvt --version
rxvt 2.4.5 (utmp,XGetDefaults)

$ rxvt --help
Short help:  rxvt --help short
Long  help:  rxvt --help long

sendmail - mail transfer agent (MTA)

How to find the version of your sendmail? Well, "You could also send some mail to yourself and examine the header. sendmail will write the current version AND the version of the .cf file in everything it handles." But that sucks, right?

Some versions might tell you - if you know the switches:

sendmail -d0.1 -bt

But if this doesn't work then you might as well make a connection wit it:

telnet localhost smtp

But again, this requires another program (telnet) to work, too.

This leaves you with the usual method of searching for a version string in the code:

strings `which sendmail` | grep version

But wouldn't it be nice if sendmail would display this info with

sendmail --version ???


ssh - secure shell

$ ssh -V
SSH Version 1.2.26 [sparc-sun-solaris2.6], protocol version 1.5.
Standard version.  Does not use RSAREF.

tidy - validate, correct, and pretty-print HTML files

"tidy" gives version info with "-v":

$ tidy -v
Can't open "/home/guckes/.tidyrc"

HTML Tidy for Linux/x86 (release date: 1st March 2002; built on Mar  8 2002, at 11:02:47)
See http://www.w3.org/People/Raggett for details

tidy obviously checks for existence of the user's setup file ~/.tidyrc and prints an error if it does not exist. a simple "touch" will do away with this:

$ touch .tidyrc
$ tidy -v

HTML Tidy for Linux/x86 (release date: 1st March 2002; built on Mar  8 2002, at 11:02:47)
See http://www.w3.org/People/Raggett for details

I just wonder why it prints that empty line at all..

$ tidy -v
tidy 2002-03-01
this is "HTML Tidy" for Linux/x86
built on Fri Mar 08 01:03:06 2002
http://www.w3.org/People/Raggett

wget - getting webpages

$ wget -V
GNU Wget 1.8.2

Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Originally written by Hrvoje Niksic <hniksic@arsdigita.com>.

Consise info about the program name and its version number in the first line - good! However, there is no info about the release date. And the email address of the author needs an update, too.

Here's how I'd expect the version info:

$ wget -V
GNU Wget 1.8.2 [2002-05-29]
Written by Hrvoje Niksic hniksic@xemacs.org

Copyright (C) 1995-2003 Free Software Foundation, Inc. (FSF)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.

zsh - the ZShell

$ echo $ZSH_VERSION
3.0.7
But I prefer to look this info up with this alias:
alias _version='echo VERSION=$VERSION; echo ZSH_VERSION=$ZSH_VERSION'
Enjoy!


Vim - Vi IMproved

Vim is one of the programs which identify quite verbosely:
:ver
VIM - Vi IMproved 5.8 (2001 May 31, compiled Jun  5 2001 18:31:33)
Compiled by guckes@ritz, with (+) or without (-):
+autocmd -browse +builtin_terms +byte_offset +cindent +cmdline_compl
+cmdline_info +comments +cryptv -cscope +dialog_con +digraphs -emacs_tags +eval
+ex_extra +extra_search -farsi +file_in_path -osfiletype +find_in_path +fork()
-GUI -hangul_input +insert_expand -langmap +linebreak +lispindent +menu
+mksession +modify_fname +mouse -mouse_dec -mouse_gpm -mouse_netterm
+mouse_xterm -multi_byte -perl -python +quickfix -rightleft +scrollbind
+smartindent -sniff +statusline +syntax +tag_binary +tag_old_static
-tag_any_white -tcl +terminfo +textobjects +title +user_commands +visualextra
+viminfo +wildignore +wildmenu +writebackup +X11 -xfontset -xim
+xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/home/robinson/emailer/guckes/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -g -O2 -Wall -I/usr/openwin/include
Linking: gcc -o vim -L/usr/openwin/lib -R/usr/openwin/lib -lXt -lX11 -lncurses
You can get the same information from within Vim with the command :ver (or :version).


This and that

UNIX SYSTEM ADMINISTRATION --- May 23, 2001
Published by ITworld.com -- changing the way you view IT
http://www.itworld.com/newsletters

[...]

Next week, we'll look at a script that collects system and software
information, and mails it to the systems administrator. Until version
information is supplied in a standard way, keeping an up-to-date
software inventory will probably remain a painful task.

NOTE:  Though I wasn't aware of it when I wrote this column, a campaign
on the Web is underway to establish a uniform method of providing
versioning information. Sven Guckes would like to see "--version" as
the universal request. You can read about The Crusade by visiting
http://www.guckes.net/version/

Created:     Tue Jul 14 12:00:00 CEST 1998
Send feedback on this page to
Sven Guckes version-crusade@guckes.net http://www.guckes.net/version/