Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"I prefer to think that God is not dead, just drunk" -- John Huston


devel / comp.unix.shell / Re: "sed" question

SubjectAuthor
* "sed" questionOttavio Caruso
+* Re: "sed" questionOttavio Caruso
|+* Re: "sed" questionJanis Papanagnou
||+* Re: "sed" questionGrant Taylor
|||`* Re: "sed" questionJanis Papanagnou
||| `* Re: "sed" questionGrant Taylor
|||  `* Re: "sed" questionKeith Thompson
|||   +- Re: "sed" questionKeith Thompson
|||   `- Re: "sed" questionGrant Taylor
||`- Re: "sed" questionChristian Weisgerber
|+* Re: "sed" questionJulieta Shem
||+* Re: "sed" questionKeith Thompson
|||+- Re: "sed" questionJanis Papanagnou
|||`* Re: "sed" questionOttavio Caruso
||| +- Re: "sed" questionKenny McCormack
||| `* Re: "sed" questionKeith Thompson
|||  +* Re: "sed" questionvallor
|||  |+- Re: "sed" questionKenny McCormack
|||  |`- Re: "sed" questionKeith Thompson
|||  `- Re: "sed" questionJulieta Shem
||`- Re: "sed" questionOttavio Caruso
|`- Re: "sed" questionLawrence D'Oliveiro
+* Re: "sed" questionKenny McCormack
|`- Re: "sed" questionOttavio Caruso
+* Re: "sed" questionGrant Taylor
|`* Re: "sed" questionKenny McCormack
| `* Re: "sed" questionGrant Taylor
|  `- Re: "sed" questionOttavio Caruso
`- Re: "sed" questionKeith Thompson

Pages:12
Re: "sed" question

<87v85xmkjq.fsf@nosuchdomain.example.com>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7665&group=comp.unix.shell#7665

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S.Thompson+u@gmail.com (Keith Thompson)
Newsgroups: comp.unix.shell
Subject: Re: "sed" question
Date: Thu, 07 Mar 2024 20:09:29 -0800
Organization: None to speak of
Lines: 20
Message-ID: <87v85xmkjq.fsf@nosuchdomain.example.com>
References: <us9vka$fepq$1@dont-email.me> <usa01v$fj5h$1@dont-email.me>
<874jdjqcfp.fsf@yaxenu.org> <87a5nbows3.fsf@nosuchdomain.example.com>
<usc2je$vsku$2@dont-email.me>
<87jzmdoep1.fsf@nosuchdomain.example.com>
<usdufk$19m29$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="ba4161de3c6afa3b79edb2bdfdc78ddd";
logging-data="1595146"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JpxyErHKs3T17o+g4rx8H"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:CJHwl3e9sNFNuMPtBCUwH6oYohY=
sha1:DelTqKnZ4dU9Lw1iSeT5YC2FzCY=
 by: Keith Thompson - Fri, 8 Mar 2024 04:09 UTC

vallor <vallor@cultnix.org> writes:
[...]
> Anyway, thank you for the heads-up that a new edition
> of the AWK book was out. I bought it on Kindle -- would
> have bought hardcopy, but Amazon seems to only have it
> in paperback (and Kindle).
[...]

It's also available from the publisher:

https://www.informit.com/store/awk-programming-language-9780138269722

You can get it on paper, or an ebook in watermarked pdf and epub formats
(which means it's not tied to Kindle). I had some difficulties with my
pre-order, but since it's been released that shouldn't be an issue.

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Medtronic
void Void(void) { Void(); } /* The recursive call of the void */

Re: "sed" question

<87bk7oncnb.fsf@yaxenu.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7670&group=comp.unix.shell#7670

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jshem@yaxenu.org (Julieta Shem)
Newsgroups: comp.unix.shell
Subject: Re: "sed" question
Date: Fri, 08 Mar 2024 09:14:48 -0300
Organization: A noiseless patient Spider
Lines: 37
Message-ID: <87bk7oncnb.fsf@yaxenu.org>
References: <us9vka$fepq$1@dont-email.me> <usa01v$fj5h$1@dont-email.me>
<874jdjqcfp.fsf@yaxenu.org> <87a5nbows3.fsf@nosuchdomain.example.com>
<usc2je$vsku$2@dont-email.me>
<87jzmdoep1.fsf@nosuchdomain.example.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="709217590c1a7d211dc83a3985170039";
logging-data="1772385"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5JXzfMls66/kfVhfrLtoF2aS6XvLBUpk="
Cancel-Lock: sha1:psyFa+yB/i4iCC1Rq8uj8rA0AKU=
sha1:E/eKPVFI+8bACtTYV/S56iCRA1I=
 by: Julieta Shem - Fri, 8 Mar 2024 12:14 UTC

Keith Thompson <Keith.S.Thompson+u@gmail.com> writes:

> Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> writes:
>> Am 06/03/2024 um 21:50 schrieb Keith Thompson:
>>> Julieta Shem <jshem@yaxenu.org> writes:
>>>> Ottavio Caruso <ottavio2006-usenet2012@yahoo.com> writes:
>>>>
>>>> [...]
>>>>
>>>>> Sorry for the noise. I never got to learn awk properly.
>>>>
>>>> The book
>>>>
>>>> The AWK Programming Language
>>>> Alfred V. Aho, Brian W. Kernighan, Peter J. Weinberger
>>>> Addison-Wesley Publishing Company, 1988
>>>> ISBN 0-201-07981-X
>>>>
>>>> is one of the most interesting books on programming ever written.
>>>> (Along with SICP, HtDP and others.)
>>> The second edition was published in 2024.
>>> SICP is "Structure and Interpretation of Computer Programs" by
>>> Harold
>>> Abelson and Gerald Jay Sussman with Julie Sussman.
>>> HtDP is "How to Design Programs" by Matthias Felleisen, Robert Bruce
>>> Findler, Matthew Flatt, and Shriram Krishnamurthi.
>>
>> For fucks sake, I know what awk is. I just never bothered learning it.
>>
>> Just because you see a foreign name, you all expect we live in a cave.
>
> What on Earth are you talking about? I didn't even notice your name.
> I just expanded on what Julieta Shem wrote, and you somehow managed
> to take offense. (I didn't know what HtDP means; I had to look it
> up, and then I shared that information with the group.)

He doesn't know how to use NNTP. Newbies, you know.

Re: "sed" question

<slrnuuolcp.2g4k.naddy@lorvorc.mips.inka.de>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7688&group=comp.unix.shell#7688

  copy link   Newsgroups: comp.unix.shell comp.lang.awk
Followup: comp.lang.awk
Path: i2pn2.org!i2pn.org!paganini.bofh.team!weretis.net!feeder8.news.weretis.net!news.szaf.org!inka.de!mips.inka.de!.POSTED.localhost!not-for-mail
From: naddy@mips.inka.de (Christian Weisgerber)
Newsgroups: comp.unix.shell,comp.lang.awk
Subject: Re: "sed" question
Followup-To: comp.lang.awk
Date: Sat, 9 Mar 2024 12:27:05 -0000 (UTC)
Message-ID: <slrnuuolcp.2g4k.naddy@lorvorc.mips.inka.de>
References: <us9vka$fepq$1@dont-email.me> <usa01v$fj5h$1@dont-email.me>
<usagql$j9bc$1@dont-email.me>
Injection-Date: Sat, 9 Mar 2024 12:27:05 -0000 (UTC)
Injection-Info: lorvorc.mips.inka.de; posting-host="localhost:::1";
logging-data="82069"; mail-complaints-to="usenet@mips.inka.de"
User-Agent: slrn/1.0.3 (FreeBSD)
 by: Christian Weisgerber - Sat, 9 Mar 2024 12:27 UTC

On 2024-03-06, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:

>> $ awk '{print $1, "1-1"}' newsrc-news.eternal-september.org-test >
>> newsrc-news.eternal-september.org
>
> In this specific case of regular data you can simplify that to
>
> awk '$2="1-1"' sourcefile > targetfile

That had me scratching my head. You can't have an action without
enclosing braces. But it's still legal syntax because... it's an
expression serving as a pattern. The assignment itself is a side
effect.

Care needs to be taken when using this shortcut so the expression
doesn't evalute as false:

$ printf 'one 1\ntwo 2\nthree 3\n' | awk '$2=4'
one 4
two 4
three 4
$ printf 'one 1\ntwo 2\nthree 3\n' | awk '$2=0'
$

$ printf 'one 1\ntwo 2\nthree 3\n' | awk '$2="4"'
one 4
two 4
three 4
$ printf 'one 1\ntwo 2\nthree 3\n' | awk '$2=""'
$

--
Christian "naddy" Weisgerber naddy@mips.inka.de

Re: "sed" question

<utqnmr$nd8i$2@dont-email.me>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=7731&group=comp.unix.shell#7731

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ldo@nz.invalid (Lawrence D'Oliveiro)
Newsgroups: comp.unix.shell
Subject: Re: "sed" question
Date: Mon, 25 Mar 2024 02:31:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 6
Message-ID: <utqnmr$nd8i$2@dont-email.me>
References: <us9vka$fepq$1@dont-email.me> <usa01v$fj5h$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 25 Mar 2024 03:31:56 +0100
Injection-Info: dont-email.me; posting-host="d4feffa95bbe0e58068bbc1004bce242";
logging-data="767250"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CZxFNoBJC/YOzAL9dKXlg"
User-Agent: Pan/0.155 (Kherson; fc5a80b8)
Cancel-Lock: sha1:JueTAVuzvhxmQvNO6i6QHSjCO+g=
 by: Lawrence D'Oliv - Mon, 25 Mar 2024 02:31 UTC

On Wed, 6 Mar 2024 14:53:51 +0000, Ottavio Caruso wrote:

> Sorry for the noise. I never got to learn awk properly.

I never bothered, because Perl does everything that Awk does, just as
concisely, and more besides.

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor