aboutsummaryrefslogtreecommitdiffstats
path: root/luhncheck.1
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-12-27 22:37:47 +0100
committerMattias Andrée <m@maandree.se>2025-12-27 22:37:47 +0100
commit4506c1e56ec89ad42c1a37f4b9b41204e4d991d1 (patch)
tree477d80ea90a4d827e70bb5d85781c1e366cee124 /luhncheck.1
downloadgluhncheck-4506c1e56ec89ad42c1a37f4b9b41204e4d991d1.tar.gz
gluhncheck-4506c1e56ec89ad42c1a37f4b9b41204e4d991d1.tar.bz2
gluhncheck-4506c1e56ec89ad42c1a37f4b9b41204e4d991d1.tar.xz
First commit
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'luhncheck.1')
-rw-r--r--luhncheck.185
1 files changed, 85 insertions, 0 deletions
diff --git a/luhncheck.1 b/luhncheck.1
new file mode 100644
index 0000000..11da1e5
--- /dev/null
+++ b/luhncheck.1
@@ -0,0 +1,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)