Posted by brechmos on 01/22/08 17:05
I need to reply to my stupidty already...
assume it is
here1/there/200801/everywhere
here2/there/200803/everywhere2
here3/there/200802/everywhere3
to...
here1/there/200801/everywhere
here3/there/200802/everywhere2
here2/there/200803/everywhere3
otherwise a simple sort command would work...
On Jan 22, 12:04 pm, brechmos <brech...@gmail.com> wrote:
> A bit of a dumb question. I have an array of directories and would
> like to sort the array based on the third directory element...
>
> e.g., from...
>
> here/there/200801/everywhere
> here/there/200803/everywhere2
> here/there/200802/everywhere3
>
> to...
>
> here/there/200801/everywhere
> here/there/200802/everywhere2
> here/there/200803/everywhere3
>
> I can think of lots of unelegant ways, is there an elegant one? (few
> lines of code?)
>
> Thanks...
[Back to original message]
|