/usr/bin/nnum is in stda 1.1-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
VERSION=1.3.3
NAME=`basename $0`
NV="$NAME $VERSION:"
LICENSE="Copyright (C) 2006, 2007, 2009, 2011 Dimitar Ivanov
License: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law."
sep=`echo |awk '{printf( "%080s", 0 )}' |tr 0 -`
[ x$1 = x--help ] && set -- "-h" && NV="$NAME" && sep=""
case $1 in
-h|"")
cat << EOH && exit
$sep
$NV produce a series of equally-separated integers or floats
$sep
Usage: $NAME <begin> <end> [<step>] [<print_fmt>]
or: $NAME <number>
EOH
;;
--version)
cat << !ver && exit
$NAME $VERSION
$LICENSE
!ver
;;
esac
ofmt="%.6g"
case $# in
1) b=0; e=$1; d=1;
;;
2) b=$1; e=$2; d=1;
;;
3) b=$1; e=$2; d=$3;
;;
4) b=$1; e=$2; d=$3; ofmt=$4;
;;
*) exit 1
;;
esac
# Use e1 because of round-off errors at floating number addition
echo |awk "BEGIN { e1 = $e + ($d/10); }
{
i = $b;
while( i <= e1 )
{
printf( \"$ofmt\n\", i );
i = i + ($d);
}
}"
|