Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

The following statement is not true. The previous statement is true.


devel / alt.msdos.batch / Re: !: a bad idea (Was: The angle bracket in an echo command???)

SubjectAuthor
* Re: The angle bracket in an echo command???Muhammad Usman
`* Re: The angle bracket in an echo command???Kerr-Mudd, John
 `* Re: The angle bracket in an echo command???Muhammad Usman
  `* Re: The angle bracket in an echo command???Kenny McCormack
   `* Re: The angle bracket in an echo command???Ivan Shmakov
    `* !: a bad idea (Was: The angle bracket in an echo command???)Kenny McCormack
     `- Re: !: a bad idea (Was: The angle bracket in an echo command???)Kaz Kylheku

1
Re: The angle bracket in an echo command???

<e0f64401-6ab2-4487-bd81-62bee26d9406n@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=431&group=alt.msdos.batch#431

  copy link   Newsgroups: alt.msdos.batch
X-Received: by 2002:a05:620a:2588:b0:757:7627:d06a with SMTP id x8-20020a05620a258800b007577627d06amr6810250qko.15.1683960796983;
Fri, 12 May 2023 23:53:16 -0700 (PDT)
X-Received: by 2002:a05:6870:b52b:b0:196:7d73:7dd6 with SMTP id
v43-20020a056870b52b00b001967d737dd6mr3127027oap.6.1683960796626; Fri, 12 May
2023 23:53:16 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.msdos.batch
Date: Fri, 12 May 2023 23:53:16 -0700 (PDT)
In-Reply-To: <X6971113154254@P5-67282>#1/1>
Injection-Info: google-groups.googlegroups.com; posting-host=119.155.104.102; posting-account=x5UXEAoAAACdsd0jt6XUYKbNa8dII3KV
NNTP-Posting-Host: 119.155.104.102
References: <34694C8D.110316AD@bikerider.com> <X6971113154254@P5-67282>#1/1>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <e0f64401-6ab2-4487-bd81-62bee26d9406n@googlegroups.com>
Subject: Re: The angle bracket in an echo command???
From: muhammadusman319320@gmail.com (Muhammad Usman)
Injection-Date: Sat, 13 May 2023 06:53:16 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 7
 by: Muhammad Usman - Sat, 13 May 2023 06:53 UTC

I got the solution just after 26 years. Use single quotes such as
echo -e '<!DOCTYPE html>'
will solve the issue.

If we use double quotes, it will surely raise an error.
echo -e "<!DOCTYPE html>"
```bash: !DOCTYPE: event not found```

Re: The angle bracket in an echo command???

<20230513093439.9efb791c12665517e1dd466c@127.0.0.1>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=432&group=alt.msdos.batch#432

  copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: admin@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: alt.msdos.batch
Subject: Re: The angle bracket in an echo command???
Date: Sat, 13 May 2023 09:34:39 +0100
Organization: Dis
Lines: 24
Message-ID: <20230513093439.9efb791c12665517e1dd466c@127.0.0.1>
References: <34694C8D.110316AD@bikerider.com>
<X6971113154254@P5-67282>
<e0f64401-6ab2-4487-bd81-62bee26d9406n@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="43685ba41f58280433107bc2f05cb629";
logging-data="2165683"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/OvElawPuu4LJFj4qpZkSuL82//1YhoXQ="
Cancel-Lock: sha1:gxoCOWr99UuJdTBDMz1ujng6D7M=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
;X-no-Archive: Maybe
GNU: Terry Pratchett
 by: Kerr-Mudd, John - Sat, 13 May 2023 08:34 UTC

On Fri, 12 May 2023 23:53:16 -0700 (PDT)
Muhammad Usman <muhammadusman319320@gmail.com> wrote:

> I got the solution just after 26 years. Use single quotes such as

.... and changing OS.

> echo -e '<!DOCTYPE html>'
> will solve the issue.
>
> If we use double quotes, it will surely raise an error.
> echo -e "<!DOCTYPE html>"
> ```bash: !DOCTYPE: event not found```
>

DOS: (actually a(n?) XP cmd window)

C:\>echo -e '<!DOCTYPE html>'
The system cannot find the file specified.

--
Bah, and indeed Humbug.

Re: The angle bracket in an echo command???

<51d52d53-aacf-40da-8de2-8f26e79783cen@googlegroups.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=433&group=alt.msdos.batch#433

  copy link   Newsgroups: alt.msdos.batch
X-Received: by 2002:a05:622a:1986:b0:3f2:1f63:2b0c with SMTP id u6-20020a05622a198600b003f21f632b0cmr9778796qtc.1.1683970800910;
Sat, 13 May 2023 02:40:00 -0700 (PDT)
X-Received: by 2002:a05:6870:3289:b0:196:6a52:90e2 with SMTP id
q9-20020a056870328900b001966a5290e2mr3996760oac.8.1683970800132; Sat, 13 May
2023 02:40:00 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer03.ams4!peer.am4.highwinds-media.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: alt.msdos.batch
Date: Sat, 13 May 2023 02:39:58 -0700 (PDT)
In-Reply-To: <20230513093439.9efb791c12665517e1dd466c@127.0.0.1>
Injection-Info: google-groups.googlegroups.com; posting-host=119.155.104.102; posting-account=x5UXEAoAAACdsd0jt6XUYKbNa8dII3KV
NNTP-Posting-Host: 119.155.104.102
References: <34694C8D.110316AD@bikerider.com> <X6971113154254@P5-67282>
<e0f64401-6ab2-4487-bd81-62bee26d9406n@googlegroups.com> <20230513093439.9efb791c12665517e1dd466c@127.0.0.1>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <51d52d53-aacf-40da-8de2-8f26e79783cen@googlegroups.com>
Subject: Re: The angle bracket in an echo command???
From: muhammadusman319320@gmail.com (Muhammad Usman)
Injection-Date: Sat, 13 May 2023 09:40:00 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2063
 by: Muhammad Usman - Sat, 13 May 2023 09:39 UTC

On Saturday, 13 May 2023 at 13:36:03 UTC+5, Kerr-Mudd, John wrote:
> On Fri, 12 May 2023 23:53:16 -0700 (PDT)
> Muhammad Usman <muhammadu...@gmail.com> wrote:
>
> > I got the solution just after 26 years. Use single quotes such as
> ... and changing OS.
> > echo -e '<!DOCTYPE html>'
> > will solve the issue.
> >
> > If we use double quotes, it will surely raise an error.
> > echo -e "<!DOCTYPE html>"
> > ```bash: !DOCTYPE: event not found```
> >
> DOS: (actually a(n?) XP cmd window)
>
> C:\>echo -e '<!DOCTYPE html>'
> The system cannot find the file specified.
>
>
>
> --
> Bah, and indeed Humbug.

I was doing it on bash shell linux. Never tried it on DOS or windows

Re: The angle bracket in an echo command???

<u6d477$vron$1@news.xmission.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=434&group=alt.msdos.batch#434

  copy link   Newsgroups: alt.msdos.batch 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: alt.msdos.batch,comp.unix.shell
Subject: Re: The angle bracket in an echo command???
Date: Wed, 14 Jun 2023 19:25:27 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u6d477$vron$1@news.xmission.com>
References: <34694C8D.110316AD@bikerider.com> <e0f64401-6ab2-4487-bd81-62bee26d9406n@googlegroups.com> <20230513093439.9efb791c12665517e1dd466c@127.0.0.1> <51d52d53-aacf-40da-8de2-8f26e79783cen@googlegroups.com>
Injection-Date: Wed, 14 Jun 2023 19:25:27 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1044247"; 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, 14 Jun 2023 19:25 UTC

In article <51d52d53-aacf-40da-8de2-8f26e79783cen@googlegroups.com>,
Muhammad Usman <muhammadusman319320@gmail.com> wrote:
>On Saturday, 13 May 2023 at 13:36:03 UTC+5, Kerr-Mudd, John wrote:
>> On Fri, 12 May 2023 23:53:16 -0700 (PDT)
>> Muhammad Usman <muhammadu...@gmail.com> wrote:
>>
>> > I got the solution just after 26 years. Use single quotes such as
>> ... and changing OS.
>> > echo -e '<!DOCTYPE html>'
>> > will solve the issue.
>> >
>> > If we use double quotes, it will surely raise an error.
>> > echo -e "<!DOCTYPE html>"
>> > ```bash: !DOCTYPE: event not found```
....

>I was doing it on bash shell linux. Never tried it on DOS or windows

Then you posted to the wrong newsgroup.

Anyway, believe it or not, it is not the angle brackets that are giving you
grief (see below - *); rather, it is the exclamation point (!). You need to
read up on the topic of "history substitution" in "man bash".

(*) Basically, either single or double quotes will protect angle brackets,
but you need single quotes to protect "!".

--
Faith doesn't give you the answers; it just stops you from asking the questions.

Re: The angle bracket in an echo command???

<u6fvb9$hdk2$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=435&group=alt.msdos.batch#435

  copy link   Newsgroups: comp.unix.shell alt.msdos.batch
Followup: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ivan@siamics.netNOSPAM.invalid (Ivan Shmakov)
Newsgroups: comp.unix.shell,alt.msdos.batch
Subject: Re: The angle bracket in an echo command???
Followup-To: comp.unix.shell
Date: Thu, 15 Jun 2023 21:20:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <u6fvb9$hdk2$1@dont-email.me>
References: <34694C8D.110316AD@bikerider.com>
<e0f64401-6ab2-4487-bd81-62bee26d9406n@googlegroups.com>
<20230513093439.9efb791c12665517e1dd466c@127.0.0.1>
<51d52d53-aacf-40da-8de2-8f26e79783cen@googlegroups.com>
<u6d477$vron$1@news.xmission.com>
Injection-Date: Thu, 15 Jun 2023 21:20:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6678708100559b740e5279b06380b171";
logging-data="571010"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/mCIK7CszUxqHIyix2vwFK"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:83VhfUWhifOBpHbFjFc5LT5w9JE=
License: CC0-1.0 (original contributions only)
 by: Ivan Shmakov - Thu, 15 Jun 2023 21:20 UTC

>>>>> On 2023-06-14, Kenny McCormack wrote:
>>>>> MU == Muhammad Usman <muhammadu...@gmail.com> wrote:

MU> I got the solution just after 26 years. Use single quotes such as
MU> echo -e '<!DOCTYPE html>'
MU> will solve the issue.

[...]

> Anyway, believe it or not, it is not the angle brackets that are
> giving you grief (see below - *); rather, it is the exclamation point
> (!). You need to read up on the topic of "history substitution" in
> "man bash".
> (*) Basically, either single or double quotes will protect angle
> brackets, but you need single quotes to protect "!".

It's also possible to disable history substitution altogether
with 'set +H'.

I believe this behavior is rather confusing to new users, and
given that C-r (reverse-search-history) and cursor keys already
offer a comparable feature, and one likely to fit better with
user's prior experience at that, my suggestion would be to
have it disabled by default.

--
FSF associate member #7257 http://am-1.org/~ivan/

!: a bad idea (Was: The angle bracket in an echo command???)

<u6g0e8$11bqs$1@news.xmission.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=436&group=alt.msdos.batch#436

  copy link   Newsgroups: comp.unix.shell alt.msdos.batch
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,alt.msdos.batch
Subject: !: a bad idea (Was: The angle bracket in an echo command???)
Date: Thu, 15 Jun 2023 21:39:20 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <u6g0e8$11bqs$1@news.xmission.com>
References: <34694C8D.110316AD@bikerider.com> <51d52d53-aacf-40da-8de2-8f26e79783cen@googlegroups.com> <u6d477$vron$1@news.xmission.com> <u6fvb9$hdk2$1@dont-email.me>
Injection-Date: Thu, 15 Jun 2023 21:39:20 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="1093468"; 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 - Thu, 15 Jun 2023 21:39 UTC

In article <u6fvb9$hdk2$1@dont-email.me>,
Ivan Shmakov <ivan@siamics.netNOSPAM.invalid> wrote:
....
> It's also possible to disable history substitution altogether
> with 'set +H'.
>
> I believe this behavior is rather confusing to new users, and
> given that C-r (reverse-search-history) and cursor keys already
> offer a comparable feature, and one likely to fit better with
> user's prior experience at that, my suggestion would be to
> have it disabled by default.

I agree. The ! thing was brought over into bash from (t)csh and it is
pretty universally a bad idea. In fact, the rules for how it is handled
are even more confusing in bash than they are in (t)csh. I can never tell
from looking at it whether or not it is going to try to trigger a history
expansion or not.

I may do as you suggest and disable it globally in my bash shells.

--
People sleep peaceably in their beds at night only because rough
men stand ready to do violence on their behalf.

George Orwell

Re: !: a bad idea (Was: The angle bracket in an echo command???)

<20230615170332.471@kylheku.com>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=437&group=alt.msdos.batch#437

  copy link   Newsgroups: comp.unix.shell alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-4973@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell,alt.msdos.batch
Subject: Re: !: a bad idea (Was: The angle bracket in an echo command???)
Date: Fri, 16 Jun 2023 00:07:07 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <20230615170332.471@kylheku.com>
References: <34694C8D.110316AD@bikerider.com>
<51d52d53-aacf-40da-8de2-8f26e79783cen@googlegroups.com>
<u6d477$vron$1@news.xmission.com> <u6fvb9$hdk2$1@dont-email.me>
<u6g0e8$11bqs$1@news.xmission.com>
Injection-Date: Fri, 16 Jun 2023 00:07:07 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9b6a5bedcb8991e78bf7042e2215e7bd";
logging-data="614935"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/IZ5mlJjGthLVt/riHo+GuQg1uGSmhjvU="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:oMBcnmL8M4/JcfnYcWXAKFtT7BM=
 by: Kaz Kylheku - Fri, 16 Jun 2023 00:07 UTC

On 2023-06-15, Kenny McCormack <gazelle@shell.xmission.com> wrote:
> In article <u6fvb9$hdk2$1@dont-email.me>,
> Ivan Shmakov <ivan@siamics.netNOSPAM.invalid> wrote:
> ...
>> It's also possible to disable history substitution altogether
>> with 'set +H'.
>>
>> I believe this behavior is rather confusing to new users, and
>> given that C-r (reverse-search-history) and cursor keys already
>> offer a comparable feature, and one likely to fit better with
>> user's prior experience at that, my suggestion would be to
>> have it disabled by default.
>
> I agree. The ! thing was brought over into bash from (t)csh and it is
> pretty universally a bad idea.

Do you remember There was a period in the 1990's when tcsh was widely
used? It was popular among early Linux users, too. I remember
getting a default login shell as tcsh on some systems, having
to change it with chsh.

It hink this was a spill-over effect of csh use on proprietary Unix
systems; people coming from that finding an equivalent in tcsh.

Bash aping some tcsh features (even not so good ones) probably helped
wean people off that.

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

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor