.\" loop - Copyright (C) 1997 Murray Nesbitt (websrc AT nesbitt.ca) .\" .\" This program is protected and licensed under the following terms and .\" conditions: 1) it may not be redistributed in binary form without the .\" explicit permission of the author; 2) when redistributed in source .\" form, in whole or in part, this complete copyright statement must .\" remain intact. .TH LOOP 1 .SH NAME loop \- prints to stdout a series of numbers from `start' to `end' .SH SYNOPSIS .B loop [ .B -o ] [ .B -x ] .SH DESCRIPTION .I loop prints to stdout a series of numbers from `start' (arg 1) to `end' (arg 2), with optional increment (arg 3) and zero-padded field width (arg 4). Hex (-x) or octal (-o) output formats are available. Negative numbers are allowed, and a negative `increment' does the expected thing. .SH OPTIONS .TP .B \-o Output numbers in octal .TP .B \-x Output numbers in hexadecimal .SH EXAMPLES .PP .RS $ loop 1 3 .RE .RS 1 .RE .RS 2 .RE .RS 3 .RE .RS $ loop 2 6 2 .RE .RS 2 .RE .RS 4 .RE .RS 6 .RE .RS $ loop 2 10 2 2 .RE .RS 02 .RE .RS 04 .RE .RS 06 .RE .RS 08 .RE .RS 10 .RE .RS $ # Create 10 test files, 'test01' through 'test10' .RE .RS $ for i in `loop 1 10 1 2`; do touch test$i; done .RE .RS $ loop -x -8 8 4 8 .RE .RS FFFFFFF8 .RE .RS FFFFFFFC .RE .RS 00000000 .RE .RS 00000004 .RE .RS 00000008 .RE .RS $ loop 4 0 -1 .RE .RS 4 .RE .RS 3 .RE .RS 2 .RE .RS 1 .RE .RS 0 .RE .SH AUTHOR Murray Nesbitt (websrc AT nesbitt.ca)