blob: 11da1e57d8551b941929bf509a024cef94f1f0e4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
.TH LUHNCHECK 1 LUHNCHECK
.SH NAME
luhncheck \- Check number with Luhn's algorithm
.SH SYNOPSIS
.B luhncheck
.IR number " ..."
.SH DESCRIPTION
The
.B luhncheck
utility checks that a number, containing a check digit,
is valid according to Luhn's algorithm.
.SH OPTIONS
The
.B luhncheck
utility conforms to the Base Definitions volume of POSIX.1-2017,
.IR "Section 12.2" ,
.IR "Utility Syntax Guidelines" .
.PP
No options are supported.
.SH OPERANDS
The following operand is supported:
.TP
.I number
Number to check.
.SH STDIN
Not used.
.SH INPUT FILES
None.
.SH ENVIRONMENT VARIABLES
No environment variables affect the execution of
.BR luhncheck .
.SH ASYNCHRONOUS EVENTS
Default.
.SH STDOUT
The
.B luhncheck
utility will print one line per
.IR number ,
in the order they are provided in the command line,
to the standard output.
Each line will be use the format
.RS
.B \(dq%s is %s\en\(dq,
.IB number ,
.RI < \fB\(dqOK\(dq\fP\ if\ valid,\ \fB\(dqinvalid\(dq\fP\ otherwise >.
.RE
.SH STDERR
The standard error is only used for diagnostic messages.
.SH OUTPUT FILES
None.
.SH EXTENDED DESCRIPTION
None.
.SH EXIT STATUS
The following exit values are returned:
.TP
0
All
.IR number s
are valid.
.TP
1
At least one
.I number
is invalid.
.TP
2
An error occured.
.SH SEE ALSO
.BR gluhncheck (1)
|