Skip to content

man ‐‐

Jean-Raphaël GAGLIONE edited this page Dec 22, 2017 · 10 revisions

NAME

-- - increment a variable by one

SYNOPSIS

-- VAR [MIN] [MAX]

DESCRIPTION

Decrement a variable by one.

If bounds are specified, switch to modular arithmetic, and the variable will iterate within the boundaries.
The second bound is set to zero if not given.
An unset variable will be set to the greatest bound if the last one is defined.

With boundaries given, when the variable (re)start a cycle the error code 255 is returned (instead of 0). This let you chain the commands with ||.

OPTIONS

VAR : the decremented variable

MIN, MAX : range boundaries (order does not matter)

EXIT STATUS

0 : if OK and no revolution

1 : if invalid parameters

2 : if previous value is inconsistent

255 : if OK and revolution (modular arithmetic)

SEE ALSO

++

Command manual

Clone this wiki locally