Re: minimum function?
Re: minimum function?
- Subject: Re: minimum function?
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 6 Apr 2005 19:41:17 -0400
On Apr 6, 2005 7:27 PM, Martin Orpen <email@hidden> wrote:on 6/4/05 21:14, Mark J. Reed at email@hidden wrote:
Thanks for the script. As it goes to the trouble of sorting all the input
rather than just grabbing the min value, it doesn't really stand a chance
against the AS hack.
Didn't intend for it to. If I cared about performance, I would
(1) not use bash and (2) not use selection sort. It was just a
fun exercise. :)
Maybe I'm not using it correctly, but it seemed to sort the integers rather
*literally*:
-->
108
12084
12489
127
1282
Sure, just like the sort command when not invoked with the -n
option. You could make my script handle numbers with some
effort. I think using ((...)) instead of [[...]] around the
${a[i]} < ${a[min]} comparison would do the trick, although it would
then barf on anything that wasn't a legal number. :)
--
Mark J. Reed <
email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden