Re: Numerically sorted arguments (in shell)

Liste des GroupesRevenir à cu shell 
Sujet : Re: Numerically sorted arguments (in shell)
De : apple.universe (at) *nospam* posteo.net (Eric Pozharski)
Groupes : comp.unix.shell
Date : 16. Jun 2024, 19:00:11
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <slrnv6ua1b.qfh.apple.universe@freight.zombinet>
References : 1 2 3
User-Agent : slrn/1.0.3 (Linux)
with <v4ll54$3sd11$1@dont-email.me> Janis Papanagnou wrote:
On 16.06.2024 00:49, Lawrence D'Oliveiro wrote:
On Fri, 14 Jun 2024 09:31:18 +0200, Janis Papanagnou wrote:

I'm using ksh here...
*SKIP* [  8 lines   2 levels deep] # borderly ad hominem
(My approach is to take the appropriate tools and language from the
set of (a dozen, or so) "real" languages I know, plus from the set of
a handful of scripting languages that I know.)

(Disclaimer: I'm ksh-ignorant) Speaking of features.

{14439:44} [0:0]% print -cC6 *
bar-20.baz  bar-3.baz   foo-10.bar  foo-23.bar  foo-5.bar
bar-21.baz  bar-6.baz   foo-13.bar  foo-29.bar  foo-6.bar
bar-24.baz  bar-8.baz   foo-1.bar   foo-3.bar   foo-7.bar
bar-26.baz  foo-0.bar   foo-22.bar  foo-4.bar   foo-8.bar
{14445:45} [0:0]% print -cC6 *(n)
bar-3.baz   bar-21.baz  foo-1.bar   foo-6.bar   foo-13.bar
bar-6.baz   bar-24.baz  foo-3.bar   foo-7.bar   foo-22.bar
bar-8.baz   bar-26.baz  foo-4.bar   foo-8.bar   foo-23.bar
bar-20.baz  foo-0.bar   foo-5.bar   foo-10.bar  foo-29.bar

That nymph between weapon and tool is 'glob qualifier' (acts at
'filename generation' phase).  But!  It's zsh.  That being said, as a
result of cross-pollination, something similar might be in ksh too.  I
can't say where to dig through ksh-documentation.

For example, Perl or Python could do this much more easily.
I don't know of this feature in Perl or Python; please provide some
hint if there is a feature like the one I need. Some code samples for
demonstration of your point are also welcome.

Well, here's a hint:

Rule#34: If you can imagine sex, there's a module for this.

*CUT* [ 10 lines   1 level deep]

--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom

Date Sujet#  Auteur
14 Jun 24 * Numerically sorted arguments (in shell)46Janis Papanagnou
15 Jun 24 +* Re: Numerically sorted arguments (in shell)2Axel Reichert
15 Jun 24 i`- Re: Numerically sorted arguments (in shell)1Janis Papanagnou
16 Jun 24 +* Re: Numerically sorted arguments (in shell)20Lawrence D'Oliveiro
16 Jun 24 i`* Re: Numerically sorted arguments (in shell)19Janis Papanagnou
16 Jun 24 i +* Re: Numerically sorted arguments (in shell)14Lawrence D'Oliveiro
16 Jun 24 i i`* Re: Numerically sorted arguments (in shell)13Janis Papanagnou
16 Jun 24 i i +* Re: Numerically sorted arguments (in shell)4Helmut Waitzmann
17 Jun 24 i i i+- Re: Numerically sorted arguments (in shell)1Janis Papanagnou
18 Jun 24 i i i`* Re: Numerically sorted arguments (in shell)2Geoff Clare
19 Jun 24 i i i `- Re: Numerically sorted arguments (in shell)1Helmut Waitzmann
17 Jun 24 i i `* Re: Numerically sorted arguments (in shell)8Lawrence D'Oliveiro
17 Jun 24 i i  `* Re: Numerically sorted arguments (in shell)7Janis Papanagnou
17 Jun 24 i i   `* Re: Numerically sorted arguments (in shell)6Lawrence D'Oliveiro
17 Jun 24 i i    `* Re: Numerically sorted arguments (in shell)5Janis Papanagnou
18 Jun 24 i i     `* Re: Numerically sorted arguments (in shell)4Lawrence D'Oliveiro
18 Jun 24 i i      +- Re: Numerically sorted arguments (in shell)1Kenny McCormack
18 Jun 24 i i      +- Re: Numerically sorted arguments (in shell)1Janis Papanagnou
19 Jun 24 i i      `- Re: Numerically sorted arguments (in shell)1Kaz Kylheku
16 Jun 24 i `* Re: Numerically sorted arguments (in shell)4Eric Pozharski
17 Jun 24 i  `* Re: Numerically sorted arguments (in shell)3Janis Papanagnou
18 Jun 24 i   `* Re: Numerically sorted arguments (in shell)2Eric Pozharski
19 Jun 24 i    `- Re: Numerically sorted arguments (in shell)1Janis Papanagnou
18 Jun 24 +* Re: Numerically sorted arguments (in shell)5Chris Elvidge
18 Jun 24 i`* Re: Numerically sorted arguments (in shell)4Janis Papanagnou
18 Jun 24 i `* Re: Numerically sorted arguments (in shell)3Chris Elvidge
18 Jun 24 i  `* Re: Numerically sorted arguments (in shell)2Janis Papanagnou
18 Jun 24 i   `- Re: Numerically sorted arguments (in shell)1Janis Papanagnou
18 Jun 24 `* Re: Numerically sorted arguments (in shell)18Janis Papanagnou
19 Jun 24  `* Re: Numerically sorted arguments (in shell)17Chris Elvidge
19 Jun 24   `* Re: Numerically sorted arguments (in shell)16Janis Papanagnou
19 Jun 24    `* Re: Numerically sorted arguments (in shell)15Chris Elvidge
20 Jun 24     +* Re: Numerically sorted arguments (in shell)11vallor
20 Jun 24     i+- Re: Numerically sorted arguments (in shell)1Janis Papanagnou
20 Jun 24     i+* Re: Numerically sorted arguments (in shell)6Janis Papanagnou
21 Jun 24     ii`* Re: Numerically sorted arguments (in shell)5vallor
21 Jun 24     ii `* Re: Numerically sorted arguments (in shell)4Lawrence D'Oliveiro
21 Jun 24     ii  `* Re: Numerically sorted arguments (in shell)3vallor
21 Jun 24     ii   `* Re: Numerically sorted arguments (in shell)2Lawrence D'Oliveiro
21 Jun 24     ii    `- Re: Numerically sorted arguments (in shell)1Kenny McCormack
21 Jun 24     i`* Re: Numerically sorted arguments (in shell)3Chris Elvidge
24 Jun 24     i `* Is 'ls -v' the Final Solution? (Was: Numerically sorted arguments (in shell))2Kenny McCormack
24 Jun 24     i  `- Re: Is 'ls -v' the Final Solution? (Was: Numerically sorted arguments (in shell))1Janis Papanagnou
20 Jun 24     `* Re: Numerically sorted arguments (in shell)3Janis Papanagnou
24 Jun 24      `* Re: Numerically sorted arguments (in shell)2Chris Elvidge
24 Jun 24       `- Re: Numerically sorted arguments (in shell)1Janis Papanagnou

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal