[YLUG][OT] alternatives to seq when scripting for loops

Rachel Cavill rachel.cavill at googlemail.com
Fri Nov 17 16:14:09 GMT 2006


On 11/17/06, Richard G. Clegg <richard at richardclegg.org> wrote:
> Rachel Cavill wrote:
>
> > I've tried an equivalent bash solution using a while loop and
> > incrementing instead of a forloop - but I'm having problems with the
> > fact that I don't want to use integers.  The loop works fine if I set
> > everything to integer values, but the minute I try to use real values
> > I'm getting error messages.
> >
> > I know I'm missing something obvious here, but what is it?
>
> Use an integer loop and multiply by an appropriate constant?
>

I'd tried that, but with division by a constant - however something's
still going wrong - so I'm going home for the weekend.

> Weren't you in the maths dept at one point or do I have the wrong
> Rachel?  :-)

ummm... 'fraid so! attribute this to Friday afternoon postdoc brain rot.
I'll give it another go on Monday morning - it fact I'm begining to
wonder why I'm doing this in a scripting language at all - it's
beginning to look easier to adapt the python code I'm currently using
to optimise this parameter (which is ultimately what I want to do).
Thanks for the help,
Rachel



More information about the York mailing list