Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"Consistency requires you to be as ignorant today as you were a year ago." -- Bernard Berenson


devel / comp.unix.shell / What does "talking about the topics" mean? Possible language problem? (Was: The last blank line can be removed by sed.)

SubjectAuthor
* The last blank line can be removed by sed.hongy...@gmail.com
`* The last blank line can be removed by sed.Janis Papanagnou
 +* The last blank line can be removed by sed.Geoff Clare
 |`* The last blank line can be removed by sed.hongy...@gmail.com
 | `* The last blank line can be removed by sed.hongy...@gmail.com
 |  `* The last blank line can be removed by sed.Spiros Bousbouras
 |   `* The last blank line can be removed by sed.hongy...@gmail.com
 |    +- Who, indeed? (Was: The last blank line can be removed by sed.)Kenny McCormack
 |    +- The last blank line can be removed by sed.Spiros Bousbouras
 |    `* The last blank line can be removed by sed.Janis Papanagnou
 |     +- The last blank line can be removed by sed.hongy...@gmail.com
 |     `- The last blank line can be removed by sed.Geoff Clare
 `* The last blank line can be removed by sed.hongy...@gmail.com
  `* The last blank line can be removed by sed.Ed Morton
   `* The last blank line can be removed by sed.hongy...@gmail.com
    `* The last blank line can be removed by sed.Janis Papanagnou
     `- What does "talking about the topics" mean? Possible language problem? (Was: The Kenny McCormack

1
The last blank line can be removed by sed.

<1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:4e1:b0:6fe:df47:44f5 with SMTP id b1-20020a05620a04e100b006fedf4744f5mr3628261qkh.416.1673339521909;
Tue, 10 Jan 2023 00:32:01 -0800 (PST)
X-Received: by 2002:a05:6808:3088:b0:35e:3ef6:e4dc with SMTP id
bl8-20020a056808308800b0035e3ef6e4dcmr3852486oib.99.1673339521423; Tue, 10
Jan 2023 00:32:01 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 10 Jan 2023 00:32:01 -0800 (PST)
Injection-Info: google-groups.googlegroups.com; posting-host=60.249.28.132; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 60.249.28.132
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
Subject: The last blank line can be removed by sed.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Tue, 10 Jan 2023 08:32:01 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1808
 by: hongy...@gmail.com - Tue, 10 Jan 2023 08:32 UTC

See my following 2 testings:

Testing 1:

werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g;/^$/d' | tail | cat -A
znconreychar$
znconreyconductor$
znconreyexp$
znconreylog$
zncoppersmith$
znlog$
znorder$
znprimroot$
znstar$
$ werner@X10DAi:~$

Testing 2:
werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d' | tail | cat -A
znchartoprimitive$
znconreychar$
znconreyconductor$
znconreyexp$
znconreylog$
zncoppersmith$
znlog$
znorder$
znprimroot$
znstar$
werner@X10DAi:~$

As you can see, if I combine the above two sed commands into a single sed
call, the last line will be blank in the output, as shown in the testing 1.

Is there any explanation for this behavior?

Regards,
Zhao

Re: The last blank line can be removed by sed.

<tpjm4a$hpt2$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Tue, 10 Jan 2023 13:36:26 +0100
Organization: A noiseless patient Spider
Lines: 73
Message-ID: <tpjm4a$hpt2$1@dont-email.me>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 10 Jan 2023 12:36:26 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="23a2a0d16cb27c73e4a51b8cd4decb9e";
logging-data="583586"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19vVEl/qpJufA3KRFWz/RGq"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:NlpySRmcULslB21OeIrZWDVfFAU=
In-Reply-To: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
X-Enigmail-Draft-Status: N1110
 by: Janis Papanagnou - Tue, 10 Jan 2023 12:36 UTC

On 10.01.2023 09:32, hongy...@gmail.com wrote:
> See my following 2 testings:
>
> Testing 1:
>
> werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g;/^$/d' | tail | cat -A
> znconreychar$
> znconreyconductor$
> znconreyexp$
> znconreylog$
> zncoppersmith$
> znlog$
> znorder$
> znprimroot$
> znstar$
> $
> werner@X10DAi:~$
>
> Testing 2:
> werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d' | tail | cat -A
> znchartoprimitive$
> znconreychar$
> znconreyconductor$
> znconreyexp$
> znconreylog$
> zncoppersmith$
> znlog$
> znorder$
> znprimroot$
> znstar$
> werner@X10DAi:~$
>
> As you can see, if I combine the above two sed commands into a single sed
> call, the last line will be blank in the output, as shown in the testing 1.

$ gp
ksh: gp: not found [No such file or directory]

(Why don't you provide a minimum working example as you've been
suggested many times already?)

>
> Is there any explanation for this behavior?

$ { seq 3 ; echo ;}
1 2
3

$ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g;/^$/d'
1 2
3 $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d'
1 2
3

Works for me. (Same output.)

BTW, what is -E supposed to do? (Use of EREs instead of BREs?)
Option -E is not documented in my sed man page.

(You may want to consider using awk instead of these grep/sed/...
pipelines. As a side-effect that may also fix your issue.)

Janis

>
> Regards,
> Zhao
>

Re: The last blank line can be removed by sed.

<rf609j-3nf.ln1@ID-313840.user.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: geoff@clare.See-My-Signature.invalid (Geoff Clare)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Tue, 10 Jan 2023 13:40:44 +0000
Lines: 41
Message-ID: <rf609j-3nf.ln1@ID-313840.user.individual.net>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me>
Reply-To: netnews@gclare.org.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net v20PksJqgBY0/ERs1tuK6ANX14QJ8FnRTOlJ+1GVQjFUjwidRk
X-Orig-Path: ID-313840.user.individual.net!not-for-mail
Cancel-Lock: sha1:R0gNdwIvGtvd0l5+MXiIgJVHZyw=
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
 by: Geoff Clare - Tue, 10 Jan 2023 13:40 UTC

Janis Papanagnou wrote:

> On 10.01.2023 09:32, hongy...@gmail.com wrote:
>>
>> As you can see, if I combine the above two sed commands into a single sed
>> call, the last line will be blank in the output, as shown in the testing 1.
>>
>> Is there any explanation for this behavior?

REs are matched against the "pattern space", not individual lines
within the pattern space. Normally the pattern space only contains
one line, but the substitution with a \n on the right hand side makes
it contain multiple lines. Try this:

sed -Ee 's/[ ]+/\n/g;s/\n$//'

> $ { seq 3 ; echo ;}
> 1
> 2
> 3
>
> $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g;/^$/d'
> 1
> 2
> 3
> $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d'
> 1
> 2
> 3
>
> Works for me. (Same output.)

That's because the input to sed didn't include any space characters.
Try it with { seq 3 ; echo ' ' ;} | ...

> BTW, what is -E supposed to do? (Use of EREs instead of BREs?)

You guessed right. It will be in the next version of POSIX.

--
Geoff Clare <netnews@gclare.org.uk>

Re: The last blank line can be removed by sed.

<508d11c4-9695-40ad-9094-9b34b9862ee1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:4a0f:0:b0:3a9:59bf:fe45 with SMTP id x15-20020ac84a0f000000b003a959bffe45mr2067994qtq.674.1673360616478;
Tue, 10 Jan 2023 06:23:36 -0800 (PST)
X-Received: by 2002:a05:6870:f61c:b0:14c:9113:4869 with SMTP id
ek28-20020a056870f61c00b0014c91134869mr4121310oab.39.1673360616168; Tue, 10
Jan 2023 06:23:36 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 10 Jan 2023 06:23:35 -0800 (PST)
In-Reply-To: <tpjm4a$hpt2$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=103.149.249.17; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.149.249.17
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com> <tpjm4a$hpt2$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <508d11c4-9695-40ad-9094-9b34b9862ee1n@googlegroups.com>
Subject: Re: The last blank line can be removed by sed.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Tue, 10 Jan 2023 14:23:36 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3470
 by: hongy...@gmail.com - Tue, 10 Jan 2023 14:23 UTC

On Tuesday, January 10, 2023 at 8:38:49 PM UTC+8, Janis Papanagnou wrote:
> On 10.01.2023 09:32, hongy...@gmail.com wrote:
> > See my following 2 testings:
> >
> > Testing 1:
> >
> > werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g;/^$/d' | tail | cat -A
> > znconreychar$
> > znconreyconductor$
> > znconreyexp$
> > znconreylog$
> > zncoppersmith$
> > znlog$
> > znorder$
> > znprimroot$
> > znstar$
> > $
> > werner@X10DAi:~$
> >
> > Testing 2:
> > werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d' | tail | cat -A
> > znchartoprimitive$
> > znconreychar$
> > znconreyconductor$
> > znconreyexp$
> > znconreylog$
> > zncoppersmith$
> > znlog$
> > znorder$
> > znprimroot$
> > znstar$
> > werner@X10DAi:~$
> >
> > As you can see, if I combine the above two sed commands into a single sed
> > call, the last line will be blank in the output, as shown in the testing 1.
> $ gp
> ksh: gp: not found [No such file or directory]

gp is an easy-to-use interactive shell giving access to the PARI functions:

https://pari.math.u-bordeaux.fr/
> (Why don't you provide a minimum working example as you've been
> suggested many times already?)

I'm in a hurry and just think this is an open source software package, which is available in package repositories of various *nix systems.

> >
> > Is there any explanation for this behavior?
> $ { seq 3 ; echo ;}
> 1
> 2
> 3
>
> $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g;/^$/d'
> 1
> 2
> 3
> $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d'
> 1
> 2
> 3
>
> Works for me. (Same output.)

I also confirmed your statement with your above examples.
> BTW, what is -E supposed to do? (Use of EREs instead of BREs?)
> Option -E is not documented in my sed man page.

werner@X10DAi:~$ sed --version |head -2
sed (GNU sed) 4.8
Packaged by Debian
werner@X10DAi:~$ sed --help|grep -- -E
-E, -r, --regexp-extended
(for portability use POSIX -E).
> (You may want to consider using awk instead of these grep/sed/...
> pipelines. As a side-effect that may also fix your issue.)
>
> Janis
>
> >
> > Regards,
> > Zhao
> >

Re: The last blank line can be removed by sed.

<0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ac8:7616:0:b0:3ad:5bc:6aa6 with SMTP id t22-20020ac87616000000b003ad05bc6aa6mr369856qtq.594.1673360858993;
Tue, 10 Jan 2023 06:27:38 -0800 (PST)
X-Received: by 2002:a05:6870:e9a8:b0:14c:341b:e5ce with SMTP id
r40-20020a056870e9a800b0014c341be5cemr4300400oao.221.1673360858717; Tue, 10
Jan 2023 06:27:38 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Tue, 10 Jan 2023 06:27:38 -0800 (PST)
In-Reply-To: <rf609j-3nf.ln1@ID-313840.user.individual.net>
Injection-Info: google-groups.googlegroups.com; posting-host=103.149.249.17; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.149.249.17
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com>
Subject: Re: The last blank line can be removed by sed.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Tue, 10 Jan 2023 14:27:38 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2697
 by: hongy...@gmail.com - Tue, 10 Jan 2023 14:27 UTC

On Tuesday, January 10, 2023 at 9:41:10 PM UTC+8, Geoff Clare wrote:
> Janis Papanagnou wrote:
>
> > On 10.01.2023 09:32, hongy...@gmail.com wrote:
> >>
> >> As you can see, if I combine the above two sed commands into a single sed
> >> call, the last line will be blank in the output, as shown in the testing 1.
> >>
> >> Is there any explanation for this behavior?
> REs are matched against the "pattern space", not individual lines
> within the pattern space. Normally the pattern space only contains
> one line, but the substitution with a \n on the right hand side makes
> it contain multiple lines. Try this:
>
> sed -Ee 's/[ ]+/\n/g;s/\n$//'
> > $ { seq 3 ; echo ;}
> > 1
> > 2
> > 3
> >
> > $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g;/^$/d'
> > 1
> > 2
> > 3
> > $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d'
> > 1
> > 2
> > 3
> >
> > Works for me. (Same output.)
> That's because the input to sed didn't include any space characters.
> Try it with { seq 3 ; echo ' ' ;} | ...

Yes. As shown below:

werner@X10DAi:~$ { seq 3 ; echo ' ';} | sed -Ee 's/[ ]+/\n/g;/^$/d' | cat -A
1$
2$
3$
$ $
werner@X10DAi:~$ { seq 3 ; echo -n ' ';} | sed -Ee 's/[ ]+/\n/g;/^$/d' | cat -A
1$
2$
3$
$ werner@X10DAi:~$

> > BTW, what is -E supposed to do? (Use of EREs instead of BREs?)
> You guessed right. It will be in the next version of POSIX.
>
> --
> Geoff Clare <net...@gclare.org.uk>

Re: The last blank line can be removed by sed.

<64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:6214:3408:b0:531:eede:5cd4 with SMTP id mp8-20020a056214340800b00531eede5cd4mr1758753qvb.3.1673426463095;
Wed, 11 Jan 2023 00:41:03 -0800 (PST)
X-Received: by 2002:a05:6830:144e:b0:66e:f6cb:cb4e with SMTP id
w14-20020a056830144e00b0066ef6cbcb4emr4715807otp.105.1673426462794; Wed, 11
Jan 2023 00:41:02 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Wed, 11 Jan 2023 00:41:02 -0800 (PST)
In-Reply-To: <0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=103.149.249.17; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.149.249.17
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net> <0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>
Subject: Re: The last blank line can be removed by sed.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Wed, 11 Jan 2023 08:41:03 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 4009
 by: hongy...@gmail.com - Wed, 11 Jan 2023 08:41 UTC

On Tuesday, January 10, 2023 at 10:27:41 PM UTC+8, hongy...@gmail.com wrote:
> On Tuesday, January 10, 2023 at 9:41:10 PM UTC+8, Geoff Clare wrote:
> > Janis Papanagnou wrote:
> >
> > > On 10.01.2023 09:32, hongy...@gmail.com wrote:
> > >>
> > >> As you can see, if I combine the above two sed commands into a single sed
> > >> call, the last line will be blank in the output, as shown in the testing 1.
> > >>
> > >> Is there any explanation for this behavior?
> > REs are matched against the "pattern space", not individual lines
> > within the pattern space. Normally the pattern space only contains
> > one line, but the substitution with a \n on the right hand side makes
> > it contain multiple lines. Try this:
> >
> > sed -Ee 's/[ ]+/\n/g;s/\n$//'
> > > $ { seq 3 ; echo ;}
> > > 1
> > > 2
> > > 3
> > >
> > > $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g;/^$/d'
> > > 1
> > > 2
> > > 3
> > > $ { seq 3 ; echo ;} | sed -Ee 's/[ ]+/\n/g' | sed -Ee '/^$/d'
> > > 1
> > > 2
> > > 3
> > >
> > > Works for me. (Same output.)
> > That's because the input to sed didn't include any space characters.
> > Try it with { seq 3 ; echo ' ' ;} | ...
> Yes. As shown below:
>
> werner@X10DAi:~$ { seq 3 ; echo ' ';} | sed -Ee 's/[ ]+/\n/g;/^$/d' | cat -A
> 1$
> 2$
> 3$
> $
> $
> werner@X10DAi:~$ { seq 3 ; echo -n ' ';} | sed -Ee 's/[ ]+/\n/g;/^$/d' | cat -A
> 1$
> 2$
> 3$
> $
> werner@X10DAi:~$
> > > BTW, what is -E supposed to do? (Use of EREs instead of BREs?)
> > You guessed right. It will be in the next version of POSIX.
> >
> > --
> > Geoff Clare <net...@gclare.org.uk>

P.S. Based on the discussion here [1], the reason for the problem here is explained in the info of sed, but not in man:

werner@X10DAi:~$ sed --version |head -3
sed (GNU sed) 4.8
Packaged by Debian
Copyright (C) 2020 Free Software Foundation, Inc.

werner@X10DAi:~$ info sed |grep -A5 -i 'In a substitution command'
In a substitution command, the 'w' flag writes the substitution
result to a file, and the 'e' flag executes the subsitution result
as a shell command. As with the 'r/R/w/W/e' commands, these must
be terminated with a newline. If whitespace, comments or
semicolons are found, they will be included in the shell command or
filename, leading to unexpected results:

werner@X10DAi:~$ man sed |grep -i 'In a substitution command'

werner@X10DAi:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.10
Release: 22.10
Codename: kinetic

[1] http://pari.math.u-bordeaux.fr/archives/pari-users-2301/msg00049.html

Best,
Zhao

Re: The last blank line can be removed by sed.

<V4FsX=ZQy2lcrimOV@bongo-ra.co>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Wed, 11 Jan 2023 14:19:26 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <V4FsX=ZQy2lcrimOV@bongo-ra.co>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com> <tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net>
<0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com> <64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 11 Jan 2023 14:19:26 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="f87f6bc1cf083b3933abb1ddcf8605ba";
logging-data="980460"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sl7QgCm9izXx2fRq7r96w"
Cancel-Lock: sha1:BjfnFOQ7PXaLXgysT1l6BsrWXhg=
X-Organisation: Weyland-Yutani
X-Server-Commands: nowebcancel
In-Reply-To: <64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>
 by: Spiros Bousbouras - Wed, 11 Jan 2023 14:19 UTC

On Wed, 11 Jan 2023 00:41:02 -0800 (PST)
"hongy...@gmail.com" <hongyi.zhao@gmail.com> wrote:
> On Tuesday, January 10, 2023 at 10:27:41 PM UTC+8, hongy...@gmail.com wrote:
> > On Tuesday, January 10, 2023 at 9:41:10 PM UTC+8, Geoff Clare wrote:
> > > Janis Papanagnou wrote:
> > >
> > > > On 10.01.2023 09:32, hongy...@gmail.com wrote:
> > > >>
> > > >> As you can see, if I combine the above two sed commands into a single sed
> > > >> call, the last line will be blank in the output, as shown in the testing 1.
> > > >>
> > > >> Is there any explanation for this behavior?
> > > REs are matched against the "pattern space", not individual lines
> > > within the pattern space. Normally the pattern space only contains
> > > one line, but the substitution with a \n on the right hand side makes
> > > it contain multiple lines. Try this:
> > >
> > > sed -Ee 's/[ ]+/\n/g;s/\n$//'

^^^^^^^^^^^^^^^^^^^^^^^^^^
Solution given.

> P.S. Based on the discussion here [1], the reason for the problem here
> is explained in the info of sed, but not in man:
>
> werner@X10DAi:~$ sed --version |head -3
> sed (GNU sed) 4.8
> Packaged by Debian
> Copyright (C) 2020 Free Software Foundation, Inc.
>
> werner@X10DAi:~$ info sed |grep -A5 -i 'In a substitution command'
> In a substitution command, the 'w' flag writes the substitution
> result to a file, and the 'e' flag executes the subsitution result
> as a shell command. As with the 'r/R/w/W/e' commands, these must
> be terminated with a newline. If whitespace, comments or
> semicolons are found, they will be included in the shell command or
> filename, leading to unexpected results:

No , this quote is unrelated. The explanation for the beaviour you observed
(I wouldn't call it a problem) is explained by Geoff above and he gives a
solution too.

> [1] http://pari.math.u-bordeaux.fr/archives/pari-users-2301/msg00049.html

--
Forth is a strange combination of computer language and religion.
Sol Guber at http://mirror.optus.com.au/pub/forth/Archive/docs/mforth.rev

Re: The last blank line can be removed by sed.

<2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ad4:4e90:0:b0:51f:6af1:8fac with SMTP id dy16-20020ad44e90000000b0051f6af18facmr973513qvb.11.1673448952074;
Wed, 11 Jan 2023 06:55:52 -0800 (PST)
X-Received: by 2002:a05:6871:b0d:b0:150:3d3d:97c9 with SMTP id
fq13-20020a0568710b0d00b001503d3d97c9mr4501829oab.74.1673448951692; Wed, 11
Jan 2023 06:55:51 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Wed, 11 Jan 2023 06:55:51 -0800 (PST)
In-Reply-To: <V4FsX=ZQy2lcrimOV@bongo-ra.co>
Injection-Info: google-groups.googlegroups.com; posting-host=103.149.249.17; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.149.249.17
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net>
<0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com> <64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>
<V4FsX=ZQy2lcrimOV@bongo-ra.co>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>
Subject: Re: The last blank line can be removed by sed.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Wed, 11 Jan 2023 14:55:52 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 3630
 by: hongy...@gmail.com - Wed, 11 Jan 2023 14:55 UTC

On Wednesday, January 11, 2023 at 10:19:31 PM UTC+8, Spiros Bousbouras wrote:
> On Wed, 11 Jan 2023 00:41:02 -0800 (PST)
> "hongy...@gmail.com" <hongy...@gmail.com> wrote:
> > On Tuesday, January 10, 2023 at 10:27:41 PM UTC+8, hongy...@gmail.com wrote:
> > > On Tuesday, January 10, 2023 at 9:41:10 PM UTC+8, Geoff Clare wrote:
> > > > Janis Papanagnou wrote:
> > > >
> > > > > On 10.01.2023 09:32, hongy...@gmail.com wrote:
> > > > >>
> > > > >> As you can see, if I combine the above two sed commands into a single sed
> > > > >> call, the last line will be blank in the output, as shown in the testing 1.
> > > > >>
> > > > >> Is there any explanation for this behavior?
> > > > REs are matched against the "pattern space", not individual lines
> > > > within the pattern space. Normally the pattern space only contains
> > > > one line, but the substitution with a \n on the right hand side makes
> > > > it contain multiple lines. Try this:
> > > >
> > > > sed -Ee 's/[ ]+/\n/g;s/\n$//'
> ^^^^^^^^^^^^^^^^^^^^^^^^^^
> Solution given.
> > P.S. Based on the discussion here [1], the reason for the problem here
> > is explained in the info of sed, but not in man:
> >
> > werner@X10DAi:~$ sed --version |head -3
> > sed (GNU sed) 4.8
> > Packaged by Debian
> > Copyright (C) 2020 Free Software Foundation, Inc.
> >
> > werner@X10DAi:~$ info sed |grep -A5 -i 'In a substitution command'
> > In a substitution command, the 'w' flag writes the substitution
> > result to a file, and the 'e' flag executes the subsitution result
> > as a shell command. As with the 'r/R/w/W/e' commands, these must
> > be terminated with a newline. If whitespace, comments or
> > semicolons are found, they will be included in the shell command or
> > filename, leading to unexpected results:
> No , this quote is unrelated. The explanation for the beaviour you observed
> (I wouldn't call it a problem) is explained by Geoff above and he gives a
> solution too.

Who is Geoff?
> > [1] http://pari.math.u-bordeaux.fr/archives/pari-users-2301/msg00049.html
>
> --
> Forth is a strange combination of computer language and religion.
> Sol Guber at http://mirror.optus.com.au/pub/forth/Archive/docs/mforth.rev

Who, indeed? (Was: The last blank line can be removed by sed.)

<tpmk13$2eprl$1@news.xmission.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell
Subject: Who, indeed? (Was: The last blank line can be removed by sed.)
Date: Wed, 11 Jan 2023 15:18:59 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <tpmk13$2eprl$1@news.xmission.com>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com> <64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com> <V4FsX=ZQy2lcrimOV@bongo-ra.co> <2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>
Injection-Date: Wed, 11 Jan 2023 15:18:59 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2582389"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Wed, 11 Jan 2023 15:18 UTC

In article <2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>,
hongy...@gmail.com <hongyi.zhao@gmail.com> wrote:
....
>Who is Geoff?

Who is John Galt?

--

First of all, I do not appreciate your playing stupid here at all.

- Thomas 'PointedEars' Lahn -

Re: The last blank line can be removed by sed.

<zB8eK66XlHPYjc=dA@bongo-ra.co>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!aioe.org!wMjcvFyyQbKkD1DyxkS8fQ.user.46.165.242.91.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Wed, 11 Jan 2023 15:33:49 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <zB8eK66XlHPYjc=dA@bongo-ra.co>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com> <tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net>
<0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com> <64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com> <V4FsX=ZQy2lcrimOV@bongo-ra.co>
<2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="24043"; posting-host="wMjcvFyyQbKkD1DyxkS8fQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Server-Commands: nowebcancel
X-Organisation: Weyland-Yutani
X-Notice: Filtered by postfilter v. 0.9.2
 by: Spiros Bousbouras - Wed, 11 Jan 2023 15:33 UTC

On Wed, 11 Jan 2023 06:55:51 -0800 (PST)
"hongy...@gmail.com" <hongyi.zhao@gmail.com> wrote:
> Who is Geoff?

Who knows ? So many names , so many people , it's hard to keep track of
all of them.

Re: The last blank line can be removed by sed.

<tpmmlv$uokv$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Wed, 11 Jan 2023 17:04:15 +0100
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <tpmmlv$uokv$1@dont-email.me>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net>
<0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com>
<64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>
<V4FsX=ZQy2lcrimOV@bongo-ra.co>
<2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 11 Jan 2023 16:04:15 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="2b2d0fc4446ec4e2aad02c831312b051";
logging-data="1008287"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18DRU1yDTllS8BhALes2br3"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:00pn64HAuKtUsTMoMykngat6JmQ=
In-Reply-To: <2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>
 by: Janis Papanagnou - Wed, 11 Jan 2023 16:04 UTC

On 11.01.2023 15:55, hongy...@gmail.com wrote:
>
> Who is Geoff?

Not a person, just an acronym; General Expert Of Fabulous Facts.

Janis

Re: The last blank line can be removed by sed.

<faa02d2d-c677-47a1-aed4-1edd51cae50bn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:a05:620a:2b99:b0:6ff:aecc:3396 with SMTP id dz25-20020a05620a2b9900b006ffaecc3396mr4361461qkb.96.1673488894678;
Wed, 11 Jan 2023 18:01:34 -0800 (PST)
X-Received: by 2002:a05:6808:608:b0:360:c166:7b37 with SMTP id
y8-20020a056808060800b00360c1667b37mr3982884oih.219.1673488894396; Wed, 11
Jan 2023 18:01:34 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Wed, 11 Jan 2023 18:01:34 -0800 (PST)
In-Reply-To: <tpmmlv$uokv$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=103.152.220.131; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.152.220.131
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net>
<0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com> <64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>
<V4FsX=ZQy2lcrimOV@bongo-ra.co> <2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>
<tpmmlv$uokv$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <faa02d2d-c677-47a1-aed4-1edd51cae50bn@googlegroups.com>
Subject: Re: The last blank line can be removed by sed.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Thu, 12 Jan 2023 02:01:34 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2023
 by: hongy...@gmail.com - Thu, 12 Jan 2023 02:01 UTC

On Thursday, January 12, 2023 at 12:04:20 AM UTC+8, Janis Papanagnou wrote:
> On 11.01.2023 15:55, hongy...@gmail.com wrote:
> >
> > Who is Geoff?
> Not a person, just an acronym; General Expert Of Fabulous Facts.

I have since examined the previous discussions of this thread and feel that the name Geoff, in the context of this topic, must refer to "Geoff Clare", who had posted nice comments on the question here: https://groups.google.com/g/comp.unix.shell/c/xOUgJUut6b8/m/EFQy8LKECAAJ.

> Janis
Zhao

Re: The last blank line can be removed by sed.

<t2e59j-3oa.ln1@ID-313840.user.individual.net>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: geoff@clare.See-My-Signature.invalid (Geoff Clare)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Thu, 12 Jan 2023 13:21:01 +0000
Lines: 13
Message-ID: <t2e59j-3oa.ln1@ID-313840.user.individual.net>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me> <rf609j-3nf.ln1@ID-313840.user.individual.net>
<0df139c4-0a2b-4369-ae43-3d20b3d2b7b9n@googlegroups.com>
<64995056-f2c6-4a99-a048-eed031684bc0n@googlegroups.com>
<V4FsX=ZQy2lcrimOV@bongo-ra.co>
<2516ca7d-4c85-4af5-9153-d57d6f6a6422n@googlegroups.com>
<tpmmlv$uokv$1@dont-email.me>
Reply-To: netnews@gclare.org.uk
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: individual.net 9KvyIWrFcy7n6FxM4c5JvQD34Mhl2fbK/OvkrsveD34KI4v12k
X-Orig-Path: ID-313840.user.individual.net!not-for-mail
Cancel-Lock: sha1:VZYvg17BnIeh0e0pzgmSfr01qDM=
User-Agent: Pan/0.145 (Duplicitous mercenary valetism; d7e168a
git.gnome.org/pan2)
 by: Geoff Clare - Thu, 12 Jan 2023 13:21 UTC

Janis Papanagnou wrote:

> On 11.01.2023 15:55, hongy...@gmail.com wrote:
>>
>> Who is Geoff?
>
> Not a person, just an acronym; General Expert Of Fabulous Facts.

Thanks for that Janis. Can't remember the last time a Usenet post
made me laugh out loud.

--
Geoff Clare <netnews@gclare.org.uk>

Re: The last blank line can be removed by sed.

<tprrva$1ksnb$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: mortonspam@gmail.com (Ed Morton)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Fri, 13 Jan 2023 09:05:16 -0600
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <tprrva$1ksnb$1@dont-email.me>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me>
<508d11c4-9695-40ad-9094-9b34b9862ee1n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Fri, 13 Jan 2023 15:05:15 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="8b59e91517a3d63d85592d1831f02597";
logging-data="1733355"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JNn5oI/1ro6yZn/oknftx"
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Cancel-Lock: sha1:jtrvxFg5GQ1nqcSbrNZiZQ+4NPQ=
Content-Language: en-US
X-Antivirus-Status: Clean
X-Antivirus: Avast (VPS 230113-2, 1/13/2023), Outbound message
In-Reply-To: <508d11c4-9695-40ad-9094-9b34b9862ee1n@googlegroups.com>
 by: Ed Morton - Fri, 13 Jan 2023 15:05 UTC

On 1/10/2023 8:23 AM, hongy...@gmail.com wrote:
> On Tuesday, January 10, 2023 at 8:38:49 PM UTC+8, Janis Papanagnou wrote:
>> On 10.01.2023 09:32, hongy...@gmail.com wrote:
>>> See my following 2 testings:
>>>
>>> Testing 1:
>>>
>>> werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g;/^$/d' | tail | cat -A
<snip>
>> $ gp
>> ksh: gp: not found [No such file or directory]
>
> gp is an easy-to-use interactive shell giving access to the PARI functions:
>
> https://pari.math.u-bordeaux.fr/
>
>> (Why don't you provide a minimum working example as you've been
>> suggested many times already?)
>
> I'm in a hurry

YMMV putting your time constraints ahead of the time constraints of
everyone else who might be willing to try to help you. But, somehow you
still get answers so I guess you're absolutely right - there's no reason
for you to try to make it easy for people to help you, just do whatever
is quickest and easiest for you.

Ed.

Re: The last blank line can be removed by sed.

<eb36c824-9361-43e2-bf09-b907e852799en@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
X-Received: by 2002:ad4:5052:0:b0:532:2e21:8c0a with SMTP id m18-20020ad45052000000b005322e218c0amr1209652qvq.78.1673667696365;
Fri, 13 Jan 2023 19:41:36 -0800 (PST)
X-Received: by 2002:a81:b57:0:b0:4d8:c3ba:8cee with SMTP id
84-20020a810b57000000b004d8c3ba8ceemr1583414ywl.131.1673667696075; Fri, 13
Jan 2023 19:41:36 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.unix.shell
Date: Fri, 13 Jan 2023 19:41:35 -0800 (PST)
In-Reply-To: <tprrva$1ksnb$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=103.149.249.17; posting-account=kF0ZaAoAAACPbiK5gldhAyX5qTd3krV2
NNTP-Posting-Host: 103.149.249.17
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me> <508d11c4-9695-40ad-9094-9b34b9862ee1n@googlegroups.com>
<tprrva$1ksnb$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <eb36c824-9361-43e2-bf09-b907e852799en@googlegroups.com>
Subject: Re: The last blank line can be removed by sed.
From: hongyi.zhao@gmail.com (hongy...@gmail.com)
Injection-Date: Sat, 14 Jan 2023 03:41:36 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2740
 by: hongy...@gmail.com - Sat, 14 Jan 2023 03:41 UTC

On Friday, January 13, 2023 at 11:05:20 PM UTC+8, Ed Morton wrote:
> On 1/10/2023 8:23 AM, hongy...@gmail.com wrote:
> > On Tuesday, January 10, 2023 at 8:38:49 PM UTC+8, Janis Papanagnou wrote:
> >> On 10.01.2023 09:32, hongy...@gmail.com wrote:
> >>> See my following 2 testings:
> >>>
> >>> Testing 1:
> >>>
> >>> werner@X10DAi:~$ echo '?*' | gp -fq | grep -v 'type RETURN' | sed -Ee 's/[ ]+/\n/g;/^$/d' | tail | cat -A
> <snip>
> >> $ gp
> >> ksh: gp: not found [No such file or directory]
> >
> > gp is an easy-to-use interactive shell giving access to the PARI functions:
> >
> > https://pari.math.u-bordeaux.fr/
> >
> >> (Why don't you provide a minimum working example as you've been
> >> suggested many times already?)
> >
> > I'm in a hurry
> YMMV putting your time constraints ahead of the time constraints of
> everyone else who might be willing to try to help you. But, somehow you
> still get answers so I guess you're absolutely right - there's no reason
> for you to try to make it easy for people to help you, just do whatever
> is quickest and easiest for you.

Everything in the world has its own reason. The difficulties and ease in form certainly have a corresponding impact. However, they are relative, after all.

The Internet is so huge, and the *nix and open source world are so rich and colorful. You never know what you find difficult may just be the easiest and favorite thing in another person's eyes.
> Ed.
Zhao

Re: The last blank line can be removed by sed.

<tpu0to$1uqpk$1@dont-email.me>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou+ng@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: The last blank line can be removed by sed.
Date: Sat, 14 Jan 2023 11:42:00 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <tpu0to$1uqpk$1@dont-email.me>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com>
<tpjm4a$hpt2$1@dont-email.me>
<508d11c4-9695-40ad-9094-9b34b9862ee1n@googlegroups.com>
<tprrva$1ksnb$1@dont-email.me>
<eb36c824-9361-43e2-bf09-b907e852799en@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Jan 2023 10:42:00 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="ca782ca727267c585992120f70ae11a0";
logging-data="2059060"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+od8c7OG+eMiQfoXpmo50j"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:TxwTsgPI8zsL7/BwkPWh/yA4Xpc=
In-Reply-To: <eb36c824-9361-43e2-bf09-b907e852799en@googlegroups.com>
 by: Janis Papanagnou - Sat, 14 Jan 2023 10:42 UTC

On 14.01.2023 04:41, hongy...@gmail.com wrote:
> On Friday, January 13, 2023 at 11:05:20 PM UTC+8, Ed Morton wrote:
>>>
>>>> (Why don't you provide a minimum working example as you've been
>>>> suggested many times already?)
>>>
>>> I'm in a hurry
>> YMMV putting your time constraints ahead of the time constraints of
>> everyone else who might be willing to try to help you. But,
>> somehow you still get answers so I guess you're absolutely right -
>> there's no reason for you to try to make it easy for people to help
>> you, just do whatever is quickest and easiest for you.
>
[...]
>
> The Internet is so huge, and the *nix and open source world are so
> rich and colorful. You never know what you find difficult may just be
> the easiest and favorite thing in another person's eyes.

You seem to be basically talking about the topics (the "difficulties")
while Ed was talking about mindset and personal posting habit.

>
>> Ed.
> Zhao
>

What does "talking about the topics" mean? Possible language problem? (Was: The last blank line can be removed by sed.)

<tpu6g3$2ilt1$1@news.xmission.com>

  copy mid

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

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gazelle@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell
Subject: What does "talking about the topics" mean? Possible language problem? (Was: The last blank line can be removed by sed.)
Date: Sat, 14 Jan 2023 12:17:07 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <tpu6g3$2ilt1$1@news.xmission.com>
References: <1cc6cbdb-5aff-42fc-b0fc-274398c800bbn@googlegroups.com> <tprrva$1ksnb$1@dont-email.me> <eb36c824-9361-43e2-bf09-b907e852799en@googlegroups.com> <tpu0to$1uqpk$1@dont-email.me>
Injection-Date: Sat, 14 Jan 2023 12:17:07 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="2709409"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Sat, 14 Jan 2023 12:17 UTC

In article <tpu0to$1uqpk$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
....
>You seem to be basically talking about the topics (the "difficulties")
>while Ed was talking about mindset and personal posting habit.

What does that mean?

--
The motto of the GOP "base": You can't *be* a billionaire, but at least you
can vote like one.

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor