Am 17.02.2015 um 02:47 schrieb Hongyi Zhao:
> On Mon, 16 Feb 2015 13:54:39 +0000, Dave Farrance wrote:
>
>> So there's no loop-end exit condition, just a manipulation of the loop
>> variable?
>
> The loop-end exit condition depended on the argument of until, which is
> not necessarily has relation with j, the loop-index number. While the
> loop-index is a round-robin loop among one group of digits, just as you
> have described in the following example, i.e., making a round trip on
> digits 1-6 for 20 characters long should be like the this for my case:
>
> 12345612345612345612
>
> But, for my case, I didn't know the length of the digits characters which
> used for the loop-index number, because the only loop-end exit condition
> is controlled by the argument of until, which, as mentioned above, is not
> necessarily has relation with loop-index number.
Dave's 'until' contition and string concatenation is a *sample* (since
you did not mention any concrete condition nor what your loop actually
does). Is that so hard to understand?! I'm sure all you need is already
there, you only have to add "add one and one" (no, not literally!) to
get your code from all the input you got in this thread.
With your informal code and the suggestion I (and Dave) gave yesterday:
-------
#!/bin/bash
i=1
until [[ The_condition_is_fulfilled. ]]
do
Do_the_things_I_want_to_do_here.
i=$(( i%6 + 1 ))
done
-------
You asked for hints and got a lot.
If you neither can accurately clarify your issue nor explain in what way
the given suggestions are deviating from what you expect I'll bail out.
Good luck!
Janis