This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: sorting
- From: "Frank Ch. Eigler" <fche at redhat dot com>
- To: systemtap at sources dot redhat dot com
- Date: Wed, 14 Dec 2005 09:19:22 -0500
- Subject: Re: sorting
- References: <20051213211627.2051.hunt@redhat.com> <20051214022248.15955.qmail@sourceware.org>
Hi -
weikong wrote:
> Some time what I want to sort is not the value, but some key.
> How? can?
Yes. As the man page points out, you can put the "+" or "-" sorting
directive on an index in the foreach loop:
foreach ([a,b-] in arr) { }
Then the iteration will be in decreasing order of the second key.
- FChE