Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.shell > #25973 > unrolled thread

a sed question

Started bySalvador Mirzo <smirzo@example.com>
First post2024-12-18 16:46 -0300
Last post2024-12-24 23:53 +0000
Articles 20 on this page of 65 — 15 participants

Back to article view | Back to comp.unix.shell


Contents

  a sed question Salvador Mirzo <smirzo@example.com> - 2024-12-18 16:46 -0300
    Re: a sed question John-Paul Stewart <jpstewart@personalprojects.net> - 2024-12-18 15:12 -0500
    Re: a sed question Ralf Damaschke <rwspam@gmx.de> - 2024-12-19 01:14 +0000
      Re: a sed question Salvador Mirzo <smirzo@example.com> - 2024-12-19 09:05 -0300
        Re: a sed question Ralf Damaschke <rwspam@gmx.de> - 2024-12-20 00:55 +0000
          Re: a sed question gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-20 12:44 +0000
            Re: a sed question Ralf Damaschke <rwspam@gmx.de> - 2024-12-21 00:17 +0000
              Re: a sed question Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-21 03:09 +0000
                sed... (Was: a sed question) gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-21 03:36 +0000
                  Re: sed... (Was: a sed question) Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-21 03:57 +0000
                    Re: sed... (Was: a sed question) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-21 15:38 +0100
                      Re: sed... (Was: a sed question) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-21 17:29 +0100
                        Re: sed... Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-21 14:23 -0800
                          Re: sed... Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-22 00:33 +0100
                    Re: sed... (Was: a sed question) Lars Poulsen <lars@cleo.beagle-ears.com> - 2024-12-21 21:46 +0000
                      Re: sed... (Was: a sed question) Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-22 21:22 +0000
                Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-21 15:35 +0100
                Re: a sed question Ralf Damaschke <rwspam@gmx.de> - 2024-12-22 00:43 +0000
    Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-20 15:55 +0100
      Checking for right # of args in a shell script (Was: a sed question) gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-20 15:11 +0000
        Re: Checking for right # of args in a shell script (Was: a sed question) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-20 16:49 +0100
          Re: Checking for right # of args in a shell script (Was: a sed question) gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-20 17:43 +0000
      Re: a sed question Salvador Mirzo <smirzo@example.com> - 2024-12-21 09:17 -0300
        Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-21 16:19 +0100
          Re: a sed question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-21 13:41 -0800
            Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-22 00:50 +0100
              Re: a sed question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-21 16:26 -0800
                Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-22 01:41 +0100
              Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-22 00:31 +0000
                Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-22 02:06 +0100
        Re: a sed question Andy Walker <anw@cuboid.co.uk> - 2024-12-21 15:34 +0000
          Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-21 17:14 +0100
          Re: a sed question Salvador Mirzo <smirzo@example.com> - 2024-12-21 15:21 -0300
            Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-21 20:48 +0100
        Re: a sed question Helmut Waitzmann <nn.throttle@xoxy.net> - 2024-12-21 19:20 +0100
      Re: a sed question Ordatious <order@order.invalid> - 2024-12-22 09:19 +0000
        Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-22 19:23 +0100
    Re: a sed question Ed Morton <mortonspam@gmail.com> - 2024-12-21 08:13 -0600
      Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-21 21:09 +0000
        Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-22 01:02 +0100
          Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-22 00:28 +0000
            Re: a sed question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-21 16:36 -0800
              Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-22 01:52 +0000
                Re: a sed question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-21 21:09 -0800
                  Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-22 05:56 +0000
                    Re: a sed question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-21 22:55 -0800
                      Re: a sed question Eric Pozharski <apple.universe@posteo.net> - 2024-12-23 10:09 +0000
                        Re: a sed question gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-23 12:41 +0000
                          Re: a sed question Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-23 18:47 +0000
                          Re: a sed question Eric Pozharski <apple.universe@posteo.net> - 2024-12-24 11:20 +0000
            Re: a sed question Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-22 02:22 +0100
        Re: a sed question gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-22 01:09 +0000
        Re: a sed question Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-22 20:03 +0000
        Re: a sed question Ed Morton <mortonspam@gmail.com> - 2024-12-23 07:26 -0600
          How to solve The Miracle (was Re: a sed question) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-12-23 21:09 +0100
          Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-23 22:57 +0000
            Re: a sed question Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-12-23 15:06 -0800
              Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-24 00:28 +0000
                Re: a sed question anthk <anthk@openbsd.home> - 2025-03-23 09:45 +0000
                  Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2025-03-23 23:41 +0000
            Re: a sed question Ed Morton <mortonspam@gmail.com> - 2024-12-24 06:20 -0600
              Dealing with four-year-olds... (Was: a sed question) gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-24 12:58 +0000
              Re: a sed question Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-12-24 20:57 +0000
                Re: a sed question Kaz Kylheku <643-408-1753@kylheku.com> - 2024-12-24 21:46 +0000
                  Arguing with a four-year-old (Was: a sed question) gazelle@shell.xmission.com (Kenny McCormack) - 2024-12-24 23:53 +0000

Page 3 of 4 — ← Prev page 1 2 [3] 4  Next page →


#26010

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2024-12-22 00:28 +0000
Message-ID<vk7meu$9jp7$2@dont-email.me>
In reply to#26008
On Sun, 22 Dec 2024 01:02:03 +0100, Janis Papanagnou wrote:

> The advantage of Awk is that it's standard on Unix systems ...

On my Debian system:

    ldo@theon:~> apt-cache rdepends gawk | wc -l
    89
    ldo@theon:~> apt-cache rdepends perl | wc -l
    1121

Let’s just say, you’re more likely to find Perl than Awk on a Linux 
system ...

[toc] | [prev] | [next] | [standalone]


#26012

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2024-12-21 16:36 -0800
Message-ID<87v7vcv9in.fsf@nosuchdomain.example.com>
In reply to#26010
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sun, 22 Dec 2024 01:02:03 +0100, Janis Papanagnou wrote:
>> The advantage of Awk is that it's standard on Unix systems ...
>
> On my Debian system:
>
>     ldo@theon:~> apt-cache rdepends gawk | wc -l
>     89
>     ldo@theon:~> apt-cache rdepends perl | wc -l
>     1121
>
> Let’s just say, you’re more likely to find Perl than Awk on a Linux 
> system ...

I don't see how your conclusion follows from the data (of how many
packages depend on gawk and perl, respectively).  I'd be surprised to
see *any* Linux distribution (other than small embedded systems) that
doesn't include awk (either gawk or mawk, or even busybox awk) by
default.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

[toc] | [prev] | [next] | [standalone]


#26018

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2024-12-22 01:52 +0000
Message-ID<vk7rdi$ae6m$1@dont-email.me>
In reply to#26012
On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:

> I'd be surprised to
> see *any* Linux distribution (other than small embedded systems) that
> doesn't include awk (either gawk or mawk, or even busybox awk) by
> default.

The point being, it would likely be easier to remove Awk than to remove 
Perl.

[toc] | [prev] | [next] | [standalone]


#26019

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2024-12-21 21:09 -0800
Message-ID<87r060uwvu.fsf@nosuchdomain.example.com>
In reply to#26018
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:
>> I'd be surprised to
>> see *any* Linux distribution (other than small embedded systems) that
>> doesn't include awk (either gawk or mawk, or even busybox awk) by
>> default.
>
> The point being, it would likely be easier to remove Awk than to remove 
> Perl.

Which is quite different from what you wrote, which was that "you’re
more likely to find Perl than Awk on a Linux system".

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

[toc] | [prev] | [next] | [standalone]


#26020

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2024-12-22 05:56 +0000
Message-ID<vk89m1$gbta$1@dont-email.me>
In reply to#26019
On Sat, 21 Dec 2024 21:09:25 -0800, Keith Thompson wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>
>> On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:
>>
>>> I'd be surprised to
>>> see *any* Linux distribution (other than small embedded systems) that
>>> doesn't include awk (either gawk or mawk, or even busybox awk) by
>>> default.
>>
>> The point being, it would likely be easier to remove Awk than to remove 
>> Perl.
> 
> Which is quite different from what you wrote, which was that "you’re
> more likely to find Perl than Awk on a Linux system".

You do know that Linux systems encourage customization, don’t you?

[toc] | [prev] | [next] | [standalone]


#26021

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2024-12-21 22:55 -0800
Message-ID<87msgourzu.fsf@nosuchdomain.example.com>
In reply to#26020
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Sat, 21 Dec 2024 21:09:25 -0800, Keith Thompson wrote:
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>> On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:
>>>> I'd be surprised to
>>>> see *any* Linux distribution (other than small embedded systems) that
>>>> doesn't include awk (either gawk or mawk, or even busybox awk) by
>>>> default.
>>>
>>> The point being, it would likely be easier to remove Awk than to remove 
>>> Perl.
>> 
>> Which is quite different from what you wrote, which was that "you’re
>> more likely to find Perl than Awk on a Linux system".
>
> You do know that Linux systems encourage customization, don’t you?

I can no longer keep up with the rapid movement of the goalposts.
I see no point in continuing this discussion.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

[toc] | [prev] | [next] | [standalone]


#26026

FromEric Pozharski <apple.universe@posteo.net>
Date2024-12-23 10:09 +0000
Message-ID<slrnvmidnd.9vr.apple.universe@freight.zombinet>
In reply to#26021
with <87msgourzu.fsf@nosuchdomain.example.com> Keith Thompson wrote:
> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>> On Sat, 21 Dec 2024 21:09:25 -0800, Keith Thompson wrote:
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>> On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:

*SKIP* [  8 lines   5 levels deep] # there isn't anything to see

> I can no longer keep up with the rapid movement of the goalposts.  I
> see no point in continuing this discussion.

Point of this (and many others) discussion is to generate engagement.
Turns out, talking about lizard people doesn't ignite Usenet.  Who knew.

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

[toc] | [prev] | [next] | [standalone]


#26027

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2024-12-23 12:41 +0000
Message-ID<vkblqk$22oro$1@news.xmission.com>
In reply to#26026
In article <slrnvmidnd.9vr.apple.universe@freight.zombinet>,
Eric Pozharski  <apple.universe@posteo.net> wrote:
>with <87msgourzu.fsf@nosuchdomain.example.com> Keith Thompson wrote:
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>> On Sat, 21 Dec 2024 21:09:25 -0800, Keith Thompson wrote:
>>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>>> On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:
>
>*SKIP* [  8 lines   5 levels deep] # there isn't anything to see
>
>> I can no longer keep up with the rapid movement of the goalposts.  I
>> see no point in continuing this discussion.
>
>Point of this (and many others) discussion is to generate engagement.
>Turns out, talking about lizard people doesn't ignite Usenet.  Who knew.

Good one.  You really got LDO's number to a T.

The funny thing is: I was the one who first brought up: Wouldn't this all
be easier/better/more-maintainable in AWK.  And I knew for a dead cold fact
that mentioning AWK would bring the Perl nuts out of the woodwork to attack
AWK and say how much better it would be to use  Perl.

I couldn't have been more prescient.

-- 
Senator Marsha Blackburn (R-TN), who sits on the Judiciary Committee, said it was
"extremely inappropriate" for the president to nominate a Supreme Court justice on a
day ending with the letter "Y", and she said that "Biden is putting the demands of the
radical progressive left ahead of what is best for our nation."

[toc] | [prev] | [next] | [standalone]


#26029

FromKaz Kylheku <643-408-1753@kylheku.com>
Date2024-12-23 18:47 +0000
Message-ID<20241223101745.274@kylheku.com>
In reply to#26027
On 2024-12-23, Kenny McCormack <gazelle@shell.xmission.com> wrote:
> In article <slrnvmidnd.9vr.apple.universe@freight.zombinet>,
> Eric Pozharski  <apple.universe@posteo.net> wrote:
>>with <87msgourzu.fsf@nosuchdomain.example.com> Keith Thompson wrote:
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>> On Sat, 21 Dec 2024 21:09:25 -0800, Keith Thompson wrote:
>>>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>>>> On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:
>>
>>*SKIP* [  8 lines   5 levels deep] # there isn't anything to see
>>
>>> I can no longer keep up with the rapid movement of the goalposts.  I
>>> see no point in continuing this discussion.
>>
>>Point of this (and many others) discussion is to generate engagement.
>>Turns out, talking about lizard people doesn't ignite Usenet.  Who knew.
>
> Good one.  You really got LDO's number to a T.

What would his number be good for? Rather, check out what he volunteered about
himself in his LinkedIn profile:

- Somehow got a Master's in CS, back when Wham came out with _Make it Big_.

- After a 1-2 year gap, went back to the same school and worked for 11
  years in "user support".

- Then, essentially unemployed since 1997.

- Never worked in the actually industry in any role, let alone as a dev.

I don't know which way to call it: trust fund baby, or else burger flipper?

Oh, but he's got opinions on everything, including cockamamie code
formatting conventions everyone should be using, but nobody in their
right mind would.

P.S. Don't forget to wake me up before you go-go.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

[toc] | [prev] | [next] | [standalone]


#26036

FromEric Pozharski <apple.universe@posteo.net>
Date2024-12-24 11:20 +0000
Message-ID<slrnvml676.fp8.apple.universe@freight.zombinet>
In reply to#26027
with <vkblqk$22oro$1@news.xmission.com> Kenny McCormack wrote:
> In article <slrnvmidnd.9vr.apple.universe@freight.zombinet>,
> Eric Pozharski  <apple.universe@posteo.net> wrote:
>>with <87msgourzu.fsf@nosuchdomain.example.com> Keith Thompson wrote:
>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>> On Sat, 21 Dec 2024 21:09:25 -0800, Keith Thompson wrote:
>>>>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>>>> On Sat, 21 Dec 2024 16:36:32 -0800, Keith Thompson wrote:

>>*SKIP* [  8 lines   5 levels deep] # there isn't anything to see
>>> I can no longer keep up with the rapid movement of the goalposts.  I
>>> see no point in continuing this discussion.
>> Point of this (and many others) discussion is to generate engagement.
>> Turns out, talking about lizard people doesn't ignite Usenet.  Who
>> knew.
> Good one.  You really got LDO's number to a T.
> The funny thing is: I was the one who first brought up: Wouldn't this
> all be easier/better/more-maintainable in AWK.  And I knew for a dead
> cold fact that mentioning AWK would bring the Perl nuts out of the
> woodwork to attack AWK and say how much better it would be to use
> Perl.
> I couldn't have been more prescient.

Thank you for this clear demonstration of how engagement is laid out.

p.s.  You do understand that you don't make sense?

p.p.s.  You don't have to!  It's engagement!

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

[toc] | [prev] | [next] | [standalone]


#26017

FromJanis Papanagnou <janis_papanagnou+ng@hotmail.com>
Date2024-12-22 02:22 +0100
Message-ID<vk7pkb$a6l9$1@dont-email.me>
In reply to#26010
On 22.12.2024 01:28, Lawrence D'Oliveiro wrote:
> On Sun, 22 Dec 2024 01:02:03 +0100, Janis Papanagnou wrote:
> 
>> The advantage of Awk is that it's standard on Unix systems ...
> 
> On my Debian system:
> 
>     ldo@theon:~> apt-cache rdepends gawk | wc -l
>     89
>     ldo@theon:~> apt-cache rdepends perl | wc -l
>     1121
> 
> Let’s just say, you’re more likely to find Perl than Awk on a Linux 
> system ...

My comment was on Unix systems (not specifically Linux) and on
the Unix standards (POSIX).

Not sure what you read and understood where I wrote "standard".

Awk is demanded by POSIX, Perl isn't.

So on any standard conforming Unix you are guaranteed to *have*
a 'sh' (POSIX-shell) and an 'awk'. Moreover, even if you are
developing on a system with Perl, but will have to implement
(run) the software in a different environment, you may not be
allowed to install third party software (open or else) with it.

(One may not like such company policies but they are reality.)

Janis

[toc] | [prev] | [next] | [standalone]


#26016

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2024-12-22 01:09 +0000
Message-ID<vk7os3$20rrk$1@news.xmission.com>
In reply to#26002
In article <vk7ar2$7g01$4@dont-email.me>,
Lawrence D'Oliveiro  <ldo@nz.invalid> wrote:
>On Sat, 21 Dec 2024 08:13:52 -0600, Ed Morton wrote:
>
>> for anything else you should just use awk ...
>
>If you want to suggest Awk, you might as well use Perl. That does 
>everything Awk does, just as concisely, and plenty more besides.

So does Intercal.  Point, set match.

-- 
There are many self-professed Christians who seem to think that because
they believe in Jesus' sacrifice they can reject Jesus' teachings about
how we should treat others. In this country, they show that they reject
Jesus' teachings by voting for Republicans.

[toc] | [prev] | [next] | [standalone]


#26024

FromKaz Kylheku <643-408-1753@kylheku.com>
Date2024-12-22 20:03 +0000
Message-ID<20241222114645.813@kylheku.com>
In reply to#26002
On 2024-12-21, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Sat, 21 Dec 2024 08:13:52 -0600, Ed Morton wrote:
>
>> for anything else you should just use awk ...
>
> If you want to suggest Awk, you might as well use Perl. That does 
> everything Awk does, just as concisely, and plenty more besides.

Perl certainly does not do everything that Awk does just as concisely.

The sigils on variable names alone make Perl one-liner solutions longer.

So do the extra command line options needed in order to get an Awk-like
implicit input processing loop.

For instance, deduplicate lines:

  awk '!s[$0]++'

Larry Wall himself famously said something like "I still say awk
'{ print $1 }' a lot".


-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

[toc] | [prev] | [next] | [standalone]


#26028

FromEd Morton <mortonspam@gmail.com>
Date2024-12-23 07:26 -0600
Message-ID<vkbodn$17hej$1@dont-email.me>
In reply to#26002
On 12/21/2024 3:09 PM, Lawrence D'Oliveiro wrote:
> On Sat, 21 Dec 2024 08:13:52 -0600, Ed Morton wrote:
> 
>> for anything else you should just use awk ...
> 
> If you want to suggest Awk, you might as well use Perl. That does
> everything Awk does, just as concisely, and plenty more besides.

Awk is a mandatory POSIX tool (and so available on all POSIX-compliant 
Unix-y systems) with a tiny but powerful language focused on just text 
processing, perl is none of that. Also no-one creates cartoons like 
https://www.zoitz.com/comics/perl_small.png about awk, nor do they refer 
to it as a write-only language, because that is not a common feeling 
about the legibility of awk scripts.

	Ed.

[toc] | [prev] | [next] | [standalone]


#26030 — How to solve The Miracle (was Re: a sed question)

FromJanis Papanagnou <janis_papanagnou+ng@hotmail.com>
Date2024-12-23 21:09 +0100
SubjectHow to solve The Miracle (was Re: a sed question)
Message-ID<vkcg1a$1c1if$1@dont-email.me>
In reply to#26028
On 23.12.2024 14:26, Ed Morton wrote:
> 
> https://www.zoitz.com/comics/perl_small.png [...]

There was a not uncommon gap ("little more detail"[*]) in systems
design; above link can obviously fill that gap of how the "miracle"
might get solved (see updated chart[**]).

Janis

[*] https://www.sjaaklaan.com/images/2014-05/solution-shaping-workshops.jpg

[**] http://volatile.gridbug.de/filling-the-gap.jpg

[toc] | [prev] | [next] | [standalone]


#26031

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2024-12-23 22:57 +0000
Message-ID<vkcpt2$1dp54$7@dont-email.me>
In reply to#26028
On Mon, 23 Dec 2024 07:26:15 -0600, Ed Morton wrote:

> Awk is a mandatory POSIX tool (and so available on all POSIX-compliant
> Unix-y systems) with a tiny but powerful language focused on just text
> processing, perl is none of that.

Perl is all of that, and more. Text processing is very much the raison 
d’être for Perl. Because it turns out it can get quite complicated.

[toc] | [prev] | [next] | [standalone]


#26032

FromKeith Thompson <Keith.S.Thompson+u@gmail.com>
Date2024-12-23 15:06 -0800
Message-ID<871pxyc83k.fsf@nosuchdomain.example.com>
In reply to#26031
Lawrence D'Oliveiro <ldo@nz.invalid> writes:
> On Mon, 23 Dec 2024 07:26:15 -0600, Ed Morton wrote:
>> Awk is a mandatory POSIX tool (and so available on all POSIX-compliant
>> Unix-y systems) with a tiny but powerful language focused on just text
>> processing, perl is none of that.
>
> Perl is all of that, and more. Text processing is very much the raison 
> d’être for Perl. Because it turns out it can get quite complicated.

It's not "all of that".  Perl is not a mandatory POSIX tool.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */

[toc] | [prev] | [next] | [standalone]


#26033

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2024-12-24 00:28 +0000
Message-ID<vkcv6p$1f4ve$3@dont-email.me>
In reply to#26032
On Mon, 23 Dec 2024 15:06:39 -0800, Keith Thompson wrote:

> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>
>> On Mon, 23 Dec 2024 07:26:15 -0600, Ed Morton wrote:
>>>
>>> Awk is a mandatory POSIX tool (and so available on all POSIX-compliant
>>> Unix-y systems) with a tiny but powerful language focused on just text
>>> processing, perl is none of that.
>>
>> Perl is all of that, and more. Text processing is very much the raison
>> d’être for Perl. Because it turns out it can get quite complicated.
> 
> It's not "all of that".  Perl is not a mandatory POSIX tool.

Nobody cares.

[toc] | [prev] | [next] | [standalone]


#26269

Fromanthk <anthk@openbsd.home>
Date2025-03-23 09:45 +0000
Message-ID<slrnvtudg4.7lj.anthk@openbsd.home>
In reply to#26033
On 2024-12-24, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
> On Mon, 23 Dec 2024 15:06:39 -0800, Keith Thompson wrote:
>
>> Lawrence D'Oliveiro <ldo@nz.invalid> writes:
>>>
>>> On Mon, 23 Dec 2024 07:26:15 -0600, Ed Morton wrote:
>>>>
>>>> Awk is a mandatory POSIX tool (and so available on all POSIX-compliant
>>>> Unix-y systems) with a tiny but powerful language focused on just text
>>>> processing, perl is none of that.
>>>
>>> Perl is all of that, and more. Text processing is very much the raison
>>> d’être for Perl. Because it turns out it can get quite complicated.
>> 
>> It's not "all of that".  Perl is not a mandatory POSIX tool.
>
> Nobody cares.

AWK user there. AWK can do lots of stuff if you learn it well. And it will
serve your everywhere. Perl is nice, but AWK has no ambiguities as Perl has.

Read The AWK Programming Language. Get the AWK examples from gopher://hoi.st,
https://luxferre.top and comp.lang.awk. You have games like freecell, tetris,
sokoban, gemini:// clients, potential gopher clients and a lot more.
Not just for the classical TSV/CSV text processing.
OFC Perl can do a lot more, but, as I said, it doesn't need a C compiler
on your side to compile needed CPAN modules.

[toc] | [prev] | [next] | [standalone]


#26270

FromLawrence D'Oliveiro <ldo@nz.invalid>
Date2025-03-23 23:41 +0000
Message-ID<vrq66c$3gje1$7@dont-email.me>
In reply to#26269
On Sun, 23 Mar 2025 09:45:58 -0000 (UTC), anthk wrote:

> Perl is nice, but AWK has no ambiguities as Perl has.

What exactly are these “ambiguities”, for example?

> OFC Perl can do a lot more, but, as I said, it doesn't need a C compiler
> on your side to compile needed CPAN modules.

Can AWK do it without a C compiler?

[toc] | [prev] | [next] | [standalone]


Page 3 of 4 — ← Prev page 1 2 [3] 4  Next page →

Back to top | Article view | comp.unix.shell


csiph-web