On Thu, 14 Apr 2011, Jay Hacker wrote:
I vote for 0:
* Arrays in most programming languages start at 0
Yes, but not shells
* Unix tools that produce multiple files start at 0: split, csplit,
not head, tail and cut. A usefull example:
cat /var/log/messages | cut -c1-$COLUMNS
* Integer division of N things numbered 0..N-1 by N maps consecutive
items the same group; 1..N does not
* Integer remainder of N things numbered 0..N-1 mod N gives nice,
ordered round-robin groups; 1..N does not
* Most clusters name their machines node000-nodeXXX
* Having to escape $(( {#} - 1 )) in Bash is not pretty
Can you give an example where this is used with parallel?
/hans
--
Horsebakken 78, DK-2400 København NV