[darcs-devel] rollback.sh

Peter B. West lists at pbw.id.au
Tue Mar 18 10:10:36 UTC 2008


David Roundy wrote:
> On Mon, Mar 17, 2008 at 5:42 PM, Guillaume Outters
> <guillaume.outters at free.fr> wrote:
>>> Now that we're using bash, we could do a for loop?
> 
> Any idea how to do that? I always use seq to implement for loops in
> bash.  Of course, we could always use the ultra-lame option of writing
> 
> for i in "1 2 3 4 ... 500"; do
> 
> but that just makes me cringe.
> 
>>  Or… Mac OS has a 'jot' command; couldn't it be a replacement for 'seq'?
>>
>>  NAME
>>       jot -- print sequential or random data
> 
> But alas, my linux machine doesn't have jot.  I see I could install
> the athena-jot package, but it doesn't look like using jot will
> greatly improve our portability.

Has perl been eliminated? If not
  for i in `perl -e 'print "@{[1..500]}"'`; do echo $i; done

Or
  until [ $(($i+1)) -gt 100 ];do i=$(($i+1)); echo $i; done
assuming i has not already been set.

-- 
Peter B. West <http://cv.pbw.id.au/>
Folio <http://defoe.sourceforge.net/folio/>


More information about the darcs-devel mailing list