]> pd.if.org Git - zpackage/blob - doc/zpm-vercmp.8
remove stray debug fprintf
[zpackage] / doc / zpm-vercmp.8
1 .TH zpm-vercmp 8 2019-02-26 "ZPM 0.4"
2 .SH NAME
3 zpm-vercmp \- compare strings with version numbering
4 .SH SYNOPSIS
5 .B zpm vercmp \fR[\fB-q\fR] \fIstring1 string2\fR
6 .SH DESCRIPTION
7 \fBzpm-vercmp\fR compares its arguments, using
8 version numbering semantics.  It can operate in
9 test mode or search mode.  In search mode, activated with \-G or \-L
10 it will print the highest or lowest version string to stdout.
11 .PP
12 In test mode, it compares all the arguments, and prints '0' if they are all
13 equal, '-1' if they are in version order, and 1 if they are out of order.
14 Adjacent identical version strings are considered both equal and in order.
15 Additionally in test mode,
16 the process will exit 0 if the strings are all equal, 1 if the
17 strings are not in order, and 2 if they are in order.
18 .SH OPTIONS
19 .TP
20 \-q
21 write nothing to stdout.  The program will still exit with the
22 usual exit status
23 .TP
24 \-G
25 Print the largest argument version string found.
26 .TP
27 \-L
28 Print the smallest argument version string found.
29 .SH EXAMPLES
30 .PP
31 .nf
32 zpm-vercmp a b -> "-1"
33 .fi
34 .SH EXIT STATUS
35 .TP
36 0
37 if the strings are all equal
38 .TP
39 1
40 if the strings are not in version order
41 .TP
42 2
43 if the strings are in version order
44 .SH FILES
45 None
46 .SH ENVIRONMENT
47 None
48 .SH AUTHOR
49 Nathan Wagner
50 .SH SEE ALSO
51 zpm(8)