@mallaidh With custom increments. Unicode spaces for formatting.
#
include <stdio.h>
#
include <limits.h>
#
include <stdlib.h>
#
define NULLCHK(S) if ((S) != NULL)\
exit(1)
/*
* A basic implementation of seq(1). Does not support floating-point bounds.
*/
int
main(int argc, char **argv) {
if (argc < 2 || argc > 4)
exit(2);
long long lo, hi, inc;
const char *errstr = NULL;
lo = (argc == 2) ? 1 : strtonum(argv[1], LLONG_MIN, LLONG_MAX, &errstr);
NULLCHK(errstr);
hi = strtonum(argv[argc - 1], LLONG_MIN, LLONG_MAX, &errstr);
NULLCHK(errstr);
inc = (argc < 4) ? 1 : strtonum(argv[2], LLONG_MIN, LLONG_MAX, &errstr);
NULLCHK(errstr);
for (long long i = lo; i <= hi; i += inc)
printf("%lld\n", i);
exit(0);
}