Brian Yennie wrote:
Here's on last stab at using Rev's built-in sort:
sort lines of fld 1 numeric by (lineOffset(word 1 of each, fld 1)*100000 + (word 2 of each))
Woo hoo! Everyone loves cryptic one-liners! =P
I don't know if that quite gets it .... if the input were IPAE 1 LAG 2 IPAE 3 LAG 4
then your code would give IPAE 1 IPAE 3 LAG 2 LAG 4
while the non-Rev-sorting versions would have kept the data unchanged (they preserved blocks of lines with the same first item, rather than actually sorted on it).
Howard said:
I have long forgotten what the original question was - so I have no idea which would be "right" :-)Yours puts LAG 1 at the end, since it sorts the entire list aphabetically. So if he wants to keep the original alpha order intact and just sort within the alpha groups, you need to add a little more control to the sorts. Otherwise the simple solution is fine.
-- Alex Tweedly http://www.tweedly.net
-- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.6 - Release Date: 30/03/2005
_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution
