[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: Re: svn list - sorting (natural sort)

From: HAND,Nathan <Nathan.HAND_at_dewr.gov.au>
Date: 2005-02-07 05:17:54 CET

This works for Solaris and GNU grep.

nathanh% cat foo
module/v_1
module/v_112
module/v_20
module/v_3

nathanh% sort -t_ +1 -n < foo
module/v_1
module/v_3
module/v_20
module/v_112

> -----Original Message-----
> From: Ryan Schmidt [mailto:subversion-2004@ryandesign.com]
> Sent: Monday, February 07, 2005 9:24 AM
> To: Subversion List
> Subject: Re: svn list - sorting (natural sort)
>
>
> On 06.02.2005, at 19:10, Rob Shepherd wrote:
>
> > Ryan Schmidt wrote:
> >> I think the "Unix way" would be to pipe the output of "svn
> list URL"
> >> to a separate sorting program.
> >> The man page for "sort" didn't hint at a way to get it to do
> >> natural-order sorting, so here's a PHP script you can pipe your
> >> output through:
> >
> > unix sort will sort this as you wish by default
> >
> > svn list URL | sort
>
> On the systems I have access to (Mac OS X, Gentoo, FreeBSD) the
> built-in sort program produces this ASCII-sorted output:
>
> module/v_1
> module/v_112
> module/v_20
> module/v_3
>
> Instead of the desired naturally-sorted output:
>
> module/v_1
> module/v_3
> module/v_20
> module/v_112
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
>

Notice:
The information contained in this e-mail message and any attached files may
be confidential information, and may also be the subject of legal
professional privilege. If you are not the intended recipient any use,
disclosure or copying of this e-mail is unauthorised. If you have received
this e-mail in error, please notify the sender immediately by reply e-mail
and delete all copies of this transmission together with any attachments.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 7 05:20:30 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.