Re: [Tutor] Logical Sorting [Off-Topic]

2006-07-09 Thread Alan Gauld
>> Or use 'ls -v'. (I said it's "off topic" on the subject, sorry! >> It >> might escaped you, but 'ls' _does_ have a proper sort by version.) >> > > Which OS? Most of them, its the GNU version of ls... works on cygwin, linux, bsd, solaris Alan G

Re: [Tutor] Logical Sorting [Off-Topic]

2006-07-08 Thread زياد بن عبدالعزيز الباتلي
On Sat, 2006-07-08 at 14:39 +0200, Norbert Kaufmann wrote: <زياد بن عبدالعزيز الباتلي wrote: > [...] > > Or use ‘ls -v’. (I said it's “off topic” on the subject, sorry! It > > might escaped you, but ‘ls’ _does_ have a proper sort by version.) > > > > Which OS? > > ~$ uname -mrs > FreeBSD 6.1-

Re: [Tutor] Logical Sorting [Off-Topic]

2006-07-08 Thread Roel Schroeven
Norbert Kaufmann schreef: > زياد بن عبدالعزيز الباتلي wrote: > [...] >> Or use ‘ls -v’. (I said it's “off topic” on the subject, sorry! It >> might escaped you, but ‘ls’ _does_ have a proper sort by version.) >> > > Which OS? The one from GNU. It's commonly in GNU/Linux distributions, but it's

Re: [Tutor] Logical Sorting [Off-Topic]

2006-07-08 Thread Rinzwind
Ubuntu Linux does: [EMAIL PROTECTED]:~$ ls -v Desktop   GDM-DarkGno.tar.gz  foktopicstart   test.py~ Examples  Muziek  foktopicstart~ [EMAIL PROTECTED]:~$Here's a copy of a complete ls http://www.mediacollege.com/cgi-bin/man/page.cgi?topic=lsOn my system it's also included in both the

Re: [Tutor] Logical Sorting [Off-Topic]

2006-07-08 Thread Norbert Kaufmann
زياد بن عبدالعزيز الباتلي wrote: [...] > Or use ‘ls -v’. (I said it's “off topic” on the subject, sorry! It > might escaped you, but ‘ls’ _does_ have a proper sort by version.) > Which OS? ~$ uname -mrs FreeBSD 6.1-STABLE i386 ~$ ls -v ls: illegal option -- v usage: ls [-ABCFGHILPRSTUWZabcdfgh

Re: [Tutor] Logical Sorting [Off-Topic]

2006-07-08 Thread Alan Gauld
> Or use ‘ls -v’. (I said it's “off topic” on the subject, sorry! It > might escaped you, but ‘ls’ _does_ have a proper sort by version.) But very interesting, I'd never seen that feature of 'ls' before and the man pages don't say much about it, you need to go to the info pages. But it does inde

Re: [Tutor] Logical Sorting [Off-Topic]

2006-07-07 Thread زياد بن عبدالعزيز الباتلي
On Fri, 2006-07-07 at 10:09 -0700, Evan Klitzke wrote: > Hi, > > I am trying to sort a list of directories that correspond to kernel > sources under /usr/src/linux. I wrote some code that gets a list like > this: > ['linux-2.6.9-gentoo-r4', 'linux-2.6.16-gentoo-r11/', > 'linux-2.6.16-gentoo-r7/'

Re: [Tutor] Logical Sorting

2006-07-07 Thread Marc Poulin
I did a Google search for "python numeric sort" and found http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/135435 It seems to do what you want. Marc --- Evan Klitzke <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to sort a list of directories that > correspond to kernel > sources und

Re: [Tutor] Logical Sorting

2006-07-07 Thread Python
On Fri, 2006-07-07 at 10:09 -0700, Evan Klitzke wrote: > Hi, > > I am trying to sort a list of directories that correspond to kernel > sources under /usr/src/linux. I wrote some code that gets a list like > this: > ['linux-2.6.9-gentoo-r4', 'linux-2.6.16-gentoo-r11/', > 'linux-2.6.16-gentoo-r7/'

Re: [Tutor] Logical Sorting

2006-07-07 Thread Kent Johnson
Evan Klitzke wrote: > Hi, > > I am trying to sort a list of directories that correspond to kernel > sources under /usr/src/linux. I wrote some code that gets a list like > this: > ['linux-2.6.9-gentoo-r4', 'linux-2.6.16-gentoo-r11/', > 'linux-2.6.16-gentoo-r7/'] > > When I sort the list, I want i

Re: [Tutor] Logical Sorting

2006-07-07 Thread Evan Klitzke
On 7/7/06, Evan Klitzke <[EMAIL PROTECTED]> wrote: > Hi, > > I am trying to sort a list of directories that correspond to kernel > sources under /usr/src/linux. Err, this is under /usr/src... not that it is really pertinent to my question. -- Evan Klitzke _