ap

NAME

ap - print an arithmetic progression of integers

SYNTAX

ap [OPTION]...
ap start end [difference]

DESCRIPTION

Print a series of numbers in arithmetic progression to standard output.

Options:

-s num
start of series
-e num
end of series
-n num
number in the series
-d num
difference between numbers
-f fmt
printf-format string to be used for formatting each number

The following combinations of options may be given:

start, end
start, difference
start, end, difference
start, difference, number

EXAMPLES

The integers from 1 to 100:
ap 1 100 (or ap -s 1 -e 100)

The even numbers counting down from 1000000:

ap -s 1000000 -e 0 -d -2

Two-digit hex numbers:

ap -f '%02x' -s 0 -e 255

AUTHOR

Written by Adam Curtin, Yellowduck Ltd.

REPORTING BUGS

Contact Us

COPYRIGHT

Copyright © 2003 Yellowduck Ltd
This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.