Re: [PATCH] Add test case for ls-files --with-head
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 3, 2007, 15:36 UTC
- Message-ID
- <Pine.LNX.4.64.0710031634300.28395@racer.site>
- In-Reply-To
- <47038669.30302@viscovery.net>
Hi,
On Wed, 3 Oct 2007, Johannes Sixt wrote:
Show 14 quoted lines
> Carl Worth schrieb: > > +for num in $(seq -f%04g 1 50); do > > + touch sub/file-$num > > + echo file-$num >> expected > > +done > > seq is not universally available. Can we have that as > > for i in 0 1 2 3 4; do > for j in 0 1 2 3 4 5 6 7 8 9; do > > sub/file-$i$j > echo file-$i$j >> expected > done > done
Or as
i=1 while test $i -le 50 do num=$(printf %04d $i) > sub/file-$num echo file-$num >> expected i=$(($i+1)) done
This version should be as portable, with the benefit that it is easier to change for different start and end values.
Ciao, Dscho