[ILUG] Re: generating a list of numbers
Joseph Manning
manning at cs.ucc.ie
Wed Apr 19 10:16:42 IST 2000
Kenn,
This should work in bash:
#!/bin/bash
k=$1
while [ $k -le $2 ]; do
echo $k
k=$((k+1))
done
Cheers, Joseph
>> Date: Tue, 18 Apr 2000 22:53:28 +0100
>> From: Kenn Humborg <kenn at linux.ie>
>> To: ilug at linux.ie
>> Subject: [ILUG] generating a list of numbers
>>
>> Is there a handy shellutil or textutil that will generate a list
>> of numbers? E.g.
>>
>> $ count 1 10
>> 1
>> 2
>> 3
>> 4
>> 5
>> 6
>> 7
>> 8
>> 9
>> 10
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Joseph Manning / Computer Science / University College Cork / manning at cs.ucc.ie
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the ILUG
mailing list