DragonFly On-Line Manual Pages

Search: Section:  


LOOP(1)                DragonFly General Commands Manual               LOOP(1)

NAME

loop - prints to stdout a series of numbers from `start' to `end'

SYNOPSIS

loop [ -o ] [ -x ]

DESCRIPTION

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.

OPTIONS

-o Output numbers in octal -x Output numbers in hexadecimal

EXAMPLES

$ loop 1 3 1 2 3 $ loop 2 6 2 2 4 6 $ loop 2 10 2 2 02 04 06 08 10 $ # Create 10 test files, 'test01' through 'test10' $ for i in `loop 1 10 1 2`; do touch test$i; done $ loop -x -8 8 4 8 FFFFFFF8 FFFFFFFC 00000000 00000004 00000008 $ loop 4 0 -1 4 3 2 1 0

AUTHOR

Murray Nesbitt (websrc@nesbitt.ca) LOOP(1)

Search: Section: