Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

No one wants war. -- Kirk, "Errand of Mercy", stardate 3201.7


devel / comp.lang.c / Re: Piping to stdin

SubjectAuthor
* Piping to stdinMalcolm McLean
+* Re: Piping to stdinSpiros Bousbouras
|`* Re: Piping to stdinMalcolm McLean
| +* Re: Piping to stdinBart
| |+* Re: Piping to stdinMalcolm McLean
| ||`- Re: Piping to stdinBart
| |`- Re: Piping to stdinScott Lurndal
| +- Re: Piping to stdinScott Lurndal
| +* Re: Piping to stdinLew Pitcher
| |`* Re: Piping to stdinKaz Kylheku
| | `- Re: Piping to stdinScott Lurndal
| +* Re: Piping to stdinBen Bacarisse
| |`- Re: Piping to stdinScott Lurndal
| `* Re: Piping to stdinKenny McCormack
|  +* Re: Piping to stdinKaz Kylheku
|  |`* Re: Piping to stdinKenny McCormack
|  | `* Re: Piping to stdinKalevi Kolttonen
|  |  `* Re: Piping to stdinGary R. Schmidt
|  |   +* Re: Piping to stdinKaz Kylheku
|  |   |+- Re: Piping to stdinKeith Thompson
|  |   |+* Re: Piping to stdinRichard Kettlewell
|  |   ||+- Dealing with weird filenames (Was: Piping to stdin)Kenny McCormack
|  |   ||+* Re: Piping to stdinDavid Brown
|  |   |||+* Re: Piping to stdinRichard Harnden
|  |   ||||+- Re: Piping to stdinScott Lurndal
|  |   ||||`- Re: Piping to stdinvallor
|  |   |||`* Re: Piping to stdinRichard Kettlewell
|  |   ||| `* Re: Piping to stdinScott Lurndal
|  |   |||  +- Re: Piping to stdinKenny McCormack
|  |   |||  +- Re: Piping to stdinKeith Thompson
|  |   |||  `- Re: Piping to stdinPhil Carmody
|  |   ||`* Re: Piping to stdinJames Kuyper
|  |   || `- Re: Piping to stdinDavid Brown
|  |   |`* Re: Piping to stdinJoe Pfeiffer
|  |   | `* Re: Piping to stdinRichard Harnden
|  |   |  `- Re: Piping to stdinPhil Carmody
|  |   `* Re: Piping to stdinKalevi Kolttonen
|  |    +* Re: Piping to stdinGiovanni
|  |    |`* Re: Piping to stdinKenny McCormack
|  |    | `* Re: Piping to stdinKalevi Kolttonen
|  |    |  +* Re: Piping to stdinMuttley
|  |    |  |+* Re: Piping to stdinKalevi Kolttonen
|  |    |  ||`* Re: Piping to stdinMuttley
|  |    |  || `* Re: Piping to stdinKalevi Kolttonen
|  |    |  ||  `- Re: Piping to stdinScott Lurndal
|  |    |  |+- Re: Piping to stdinKaz Kylheku
|  |    |  |`* Re: Piping to stdinPhil Carmody
|  |    |  | `* Re: Piping to stdinMuttley
|  |    |  |  +* Re: Piping to stdinPhil Carmody
|  |    |  |  |+* Re: Piping to stdinMichael S
|  |    |  |  ||`* Re: Piping to stdinAnton Shepelev
|  |    |  |  || +- Re: Piping to stdincandycanearter07
|  |    |  |  || `- Re: Piping to stdincandycanearter07
|  |    |  |  |+* Wrecking a good thing? (Was: Piping to stdin)Kenny McCormack
|  |    |  |  ||+- Re: Wrecking a good thing?Phil Carmody
|  |    |  |  ||`- Re: Wrecking a good thing? (Was: Piping to stdin)David Brown
|  |    |  |  |+- Re: Piping to stdinMuttley
|  |    |  |  |`- Re: Piping to stdinÖö Tiib
|  |    |  |  +* Re: Piping to stdinKaz Kylheku
|  |    |  |  |+- Re: Piping to stdinMuttley
|  |    |  |  |+- Re: Piping to stdinKeith Thompson
|  |    |  |  |`- Re: Piping to stdinDavid Brown
|  |    |  |  `* Re: Piping to stdinBen Bacarisse
|  |    |  |   `* Re: Piping to stdinPhil Carmody
|  |    |  |    +* Re: Piping to stdinOğuz
|  |    |  |    |`* Re: Piping to stdinMuttley
|  |    |  |    | +* Re: Piping to stdinScott Lurndal
|  |    |  |    | |`- Re: Piping to stdinMuttley
|  |    |  |    | `* Re: Piping to stdinRainer Weikusat
|  |    |  |    |  `* What language is this? (Was: Piping to stdin)Kenny McCormack
|  |    |  |    |   `* Re: What language is this? (Was: Piping to stdin)Scott Lurndal
|  |    |  |    |    +* Re: What language is this? (Was: Piping to stdin)Kenny McCormack
|  |    |  |    |    |`* Re: What language is this?Rainer Weikusat
|  |    |  |    |    | `* Re: What language is this?Kenny McCormack
|  |    |  |    |    |  `* Re: What language is this?Rainer Weikusat
|  |    |  |    |    |   `* Re: What language is this?Kenny McCormack
|  |    |  |    |    |    `- Re: What language is this?Rainer Weikusat
|  |    |  |    |    `- Re: What language is this? (Was: Piping to stdin)Muttley
|  |    |  |    `- Re: Piping to stdinBen Bacarisse
|  |    |  +* Re: Piping to stdinPhil Carmody
|  |    |  |`* Re: Piping to stdinLew Pitcher
|  |    |  | `* Re: Piping to stdinPhil Carmody
|  |    |  |  `* Re: Piping to stdinLew Pitcher
|  |    |  |   +- Re: Piping to stdinKaz Kylheku
|  |    |  |   `- Re: Piping to stdinPhil Carmody
|  |    |  `- Re: Piping to stdinBen Bacarisse
|  |    `- Re: Piping to stdinPhil Carmody
|  `- Re: Piping to stdinNuno Silva
+* Re: Piping to stdinScott Lurndal
|`* Re: Piping to stdinKeith Thompson
| `* Re: Piping to stdinKenny McCormack
|  +* Re: Piping to stdinKaz Kylheku
|  |+- Re: Piping to stdinPhil Carmody
|  |`* Re: Piping to stdinKeith Thompson
|  | +* Re: Piping to stdinMalcolm McLean
|  | |`- Re: Piping to stdinKenny McCormack
|  | `* Re: Piping to stdinKaz Kylheku
|  |  `- Re: Piping to stdinBen Bacarisse
|  `* Re: Piping to stdinJim Jackson
|   `- Re: Piping to stdinMichael S
+- Re: Piping to stdinJohn Forkosh
`* Re: Piping to stdinKenny McCormack

Pages:12345
Re: Piping to stdin

<ubd2q4$3i4qq$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27605&group=comp.lang.c#27605

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 11:22:44 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubd2q4$3i4qq$1@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <20230813201038.114@kylheku.com> <87il9ilzzq.fsf@nosuchdomain.example.com> <758f0a4b-d8c9-44db-af3e-2c8ac1ff2354n@googlegroups.com>
Injection-Date: Mon, 14 Aug 2023 11:22:44 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3740506"; 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 - Mon, 14 Aug 2023 11:22 UTC

In article <758f0a4b-d8c9-44db-af3e-2c8ac1ff2354n@googlegroups.com>,
Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
....
>I've just coded in this line.
>
> help = opt_get(opt, "-help -h -H --help /H -?", 0);
>
>On systems which expand wildcards in the shell, you have to type
>xmltocsv "-?" to trigger help with the question mark option. But on
>Windows it should work fine. Of course if you have an Xml file named
>"H" in the root directory then you are in trouble. But you can pipe it
>to stdin and convert it that way.

I don't know if you're read/parsed my earlier responses on this thread
(yet), but I still think it is perfectly reasonable to display the help
message when the program is run with no args and stdin is a terminal (as
checked with isatty()). You can then also display it on any other arg
error; this eliminates any need to check explicitly for
-h/-H/-?/--help/etc, etc.

isatty() works on Unix/Linux/MacOS, but I suppose may not work in (native)
Windows. I don't know if it works in Cygwin/WSL/etc (It probably does;
I've just never checked it).

Alternatively, you could dispense with isatty() and require a - as a
(pseudo-) filename to read stdin.

--
The last time a Republican cared about you, you were a fetus.

Re: Piping to stdin

<ubd359$3i4qq$2@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27606&group=comp.lang.c#27606

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 11:28:41 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubd359$3i4qq$2@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co> <874jl1j4rh.fsf@bsb.me.uk>
Injection-Date: Mon, 14 Aug 2023 11:28:41 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3740506"; 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 - Mon, 14 Aug 2023 11:28 UTC

In article <874jl1j4rh.fsf@bsb.me.uk>,
Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
....
>Agreed. And newer programs will follow the ancient convention. The
>distinction, it seems to me, is not age but purpose. If you can easily
>see a program being used in a pipeline, it should silently read stdin,

No. As I mentioned earlier, if "cat" (et al) was being designed today, it
wouldn't work like that.

Remember that, in the early days of Unix, typing commands on a 110 baud
teletype, keeping typing to an absolute minimum was a top priority. Today,
not so much.

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/FreeCollege

Re: Piping to stdin

<ubdgcv$2carp$2@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27619&group=comp.lang.c#27619

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 15:14:39 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 8
Sender: <untosten@0.0.0.0>
Message-ID: <ubdgcv$2carp$2@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com> <20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
Injection-Date: Mon, 14 Aug 2023 15:14:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee3ab186f41f9a01d300549a63d9bc21";
logging-data="2501497"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Dyck82bVlms5/IJNKA7WzVHh1f151TM8="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.4.9-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:EPpeR8K9ZyDnXi9enXNZZhF57LQ=
 by: Kalevi Kolttonen - Mon, 14 Aug 2023 15:14 UTC

In comp.unix.programmer Kenny McCormack <gazelle@shell.xmission.com> wrote:
> You know that - and I know that - but do they know that?

It makes no difference. In the real world nobody has
files named '-'.

br,
KK

Re: Piping to stdin

<sWrCM.59049$m8Ke.15249@fx08.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27620&group=comp.lang.c#27620

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx08.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Piping to stdin
Newsgroups: comp.unix.programmer,comp.lang.c
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co> <874jl1j4rh.fsf@bsb.me.uk> <ubd359$3i4qq$2@news.xmission.com>
Lines: 13
Message-ID: <sWrCM.59049$m8Ke.15249@fx08.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 14 Aug 2023 15:41:12 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 14 Aug 2023 15:41:12 GMT
X-Received-Bytes: 1229
 by: Scott Lurndal - Mon, 14 Aug 2023 15:41 UTC

gazelle@shell.xmission.com (Kenny McCormack) writes:
>In article <874jl1j4rh.fsf@bsb.me.uk>,
>Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>...
>>Agreed. And newer programs will follow the ancient convention. The
>>distinction, it seems to me, is not age but purpose. If you can easily
>>see a program being used in a pipeline, it should silently read stdin,
>
>No. As I mentioned earlier, if "cat" (et al) was being designed today, it
>wouldn't work like that.

Why do you believe that?

Re: Piping to stdin

<20230814084006.350@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27623&group=comp.lang.c#27623

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 15:49:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 53
Message-ID: <20230814084006.350@kylheku.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<mc7CM.741128$GMN3.387092@fx16.iad>
<87r0o6mqme.fsf@nosuchdomain.example.com>
<ubbugh$3hium$2@news.xmission.com> <20230813201038.114@kylheku.com>
<87il9ilzzq.fsf@nosuchdomain.example.com>
Injection-Date: Mon, 14 Aug 2023 15:49:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="e46a56cd35364bd395dd3d3fbcbd4bf2";
logging-data="2510549"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uFG6rPg38ewStsaInCVeKDYYOY5Q91mI="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:DieY8aT+tgmOZny0RDxX+enubpc=
 by: Kaz Kylheku - Mon, 14 Aug 2023 15:49 UTC

On 2023-08-14, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>> On 2023-08-14, Kenny McCormack <gazelle@shell.xmission.com> wrote:
>>> In article <87r0o6mqme.fsf@nosuchdomain.example.com>,
>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>>>>scott@slp53.sl.home (Scott Lurndal) writes:
>>>>[...]
>>>>> Most programs in unix will accept '-?' or '-h' or some other flag
>>>>> to indicate that usage information is to be printed. Many utilities
>>>>> will print usage information if the input arguments are not valid.
>>>>
>>>>Most Unix programs don't use '-?' because '?' is a shell wildcard
>>>>character. If you happen to have files in the current directory named
>>>>"-x" and "-y", "myprogram -?" expands to "myprogram -x -y".
>>>
>>> Indeed - and this is one of the many reasons why insisting on an option
>>> (any option) to get help is a bad idea. Given that -? is kind of a
>>> standard in the Windows world, many programs that get ported over to
>>> Unix from Windows, will have this misfeature.
>>
>> Many command-line programs get ported to Unix from Windows?
>>
>> Why don't they adjust their conventions?
>>
>> /X /Y /Z /? is another convention; that one is smarter.
>>
>> The system installation can arrange for the first three not
>> to be paths, and for /? not to match anything due to there
>> not being a one-character item in the root dir.
>
> Having a program misbehave because there happens to be a one-character
> item in the root directory is a bad idea.

But the problem of wildcard expansion producing that by accident
seems very improbable.

The * pattern won't expand to anything that has a leading slash. You
would have to explicitly do

utility /*

where /* expands to a set of paths the first of which (and possibly
others) look like an option. I don't think that's super common
compared to *.

This seems like less of a threat than

utility *

expanding to arguments that look like - options.

I would also disallow clumping options like /abc instead
of /a /b /c, so the clashing namespace is just one character.

Re: Piping to stdin

<87sf8lha03.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27626&group=comp.lang.c#27626

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 17:19:40 +0100
Organization: A noiseless patient Spider
Lines: 59
Message-ID: <87sf8lha03.fsf@bsb.me.uk>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<mc7CM.741128$GMN3.387092@fx16.iad>
<87r0o6mqme.fsf@nosuchdomain.example.com>
<ubbugh$3hium$2@news.xmission.com> <20230813201038.114@kylheku.com>
<87il9ilzzq.fsf@nosuchdomain.example.com>
<20230814084006.350@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="4e833c0d8d6fa2b52032f5fcbebcc039";
logging-data="2525124"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+gDI9IzvvQxXDsXQoa/bnnlix0yVijWIA="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:eBuZzz4YfbR8P9KQT4eC/DhuylE=
sha1:7vvpNWecz9J+BPqbxInyMsi6CiA=
X-BSB-Auth: 1.1db6821c061e24515e8f.20230814171940BST.87sf8lha03.fsf@bsb.me.uk
 by: Ben Bacarisse - Mon, 14 Aug 2023 16:19 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> On 2023-08-14, Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>>> On 2023-08-14, Kenny McCormack <gazelle@shell.xmission.com> wrote:
>>>> In article <87r0o6mqme.fsf@nosuchdomain.example.com>,
>>>> Keith Thompson <Keith.S.Thompson+u@gmail.com> wrote:
>>>>>scott@slp53.sl.home (Scott Lurndal) writes:
>>>>>[...]
>>>>>> Most programs in unix will accept '-?' or '-h' or some other flag
>>>>>> to indicate that usage information is to be printed. Many utilities
>>>>>> will print usage information if the input arguments are not valid.
>>>>>
>>>>>Most Unix programs don't use '-?' because '?' is a shell wildcard
>>>>>character. If you happen to have files in the current directory named
>>>>>"-x" and "-y", "myprogram -?" expands to "myprogram -x -y".
>>>>
>>>> Indeed - and this is one of the many reasons why insisting on an option
>>>> (any option) to get help is a bad idea. Given that -? is kind of a
>>>> standard in the Windows world, many programs that get ported over to
>>>> Unix from Windows, will have this misfeature.
>>>
>>> Many command-line programs get ported to Unix from Windows?
>>>
>>> Why don't they adjust their conventions?
>>>
>>> /X /Y /Z /? is another convention; that one is smarter.
>>>
>>> The system installation can arrange for the first three not
>>> to be paths, and for /? not to match anything due to there
>>> not being a one-character item in the root dir.
>>
>> Having a program misbehave because there happens to be a one-character
>> item in the root directory is a bad idea.
>
> But the problem of wildcard expansion producing that by accident
> seems very improbable.
>
> The * pattern won't expand to anything that has a leading slash. You
> would have to explicitly do
>
> utility /*
>
> where /* expands to a set of paths the first of which (and possibly
> others) look like an option.

But you are suggesting users type /? for help. That could match a file
and produce almost any other flag as a result. I suspect that was
Keith's main concern.

> I would also disallow clumping options like /abc instead
> of /a /b /c, so the clashing namespace is just one character.

You could (as world king) disallow combining flags with the '-'
convention as well. You /have/ to with the '/' convention which makes
it /less/ smart in my book.

--
Ben.

Re: Piping to stdin

<slrnudkokv.7u3.jj@iridium.wf32df>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27628&group=comp.lang.c#27628

  copy link   Newsgroups: comp.lang.c comp.unix.programmer
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: jj...@franjam.org.uk (Jim Jackson)
Newsgroups: comp.lang.c,comp.unix.programmer
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 17:21:35 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 11
Message-ID: <slrnudkokv.7u3.jj@iridium.wf32df>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<mc7CM.741128$GMN3.387092@fx16.iad>
<87r0o6mqme.fsf@nosuchdomain.example.com>
<ubbugh$3hium$2@news.xmission.com>
Injection-Date: Mon, 14 Aug 2023 17:21:35 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3cec6dc63975a1866e544d510833373c";
logging-data="2539876"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ZbUPM4aslQfftB8jdwuz0W3mnyqlCBFE="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:ojPIftTirJsQlUpGNjhWOuetLWg=
 by: Jim Jackson - Mon, 14 Aug 2023 17:21 UTC

> .... Given that -? is kind of a
> standard in the Windows world, many programs that get ported over to
> Unix from Windows, will have this misfeature.
>

Command line programs ported from Windows to Unix !!!!! Sounds like an
oxymoron to me :-)

Do you have some in mind?

Re: Piping to stdin

<ube4oj$2ffk8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27630&group=comp.lang.c#27630

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: richard....@gmail.com (Richard Harnden)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 22:02:11 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <ube4oj$2ffk8$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co>
<874jl1j4rh.fsf@bsb.me.uk> <ubd359$3i4qq$2@news.xmission.com>
<sWrCM.59049$m8Ke.15249@fx08.iad>
Reply-To: nospam.harnden@gmail.com
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 14 Aug 2023 21:02:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2ee7ac9f4e0bbb299b089ffa9a876d89";
logging-data="2604680"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183Tq1sE6DXpvHb6+FtOLIEma8hSA3bmfw="
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.14.0
Cancel-Lock: sha1:IM95RG1CrfVeXfrVzUnHLmt3V+A=
In-Reply-To: <sWrCM.59049$m8Ke.15249@fx08.iad>
 by: Richard Harnden - Mon, 14 Aug 2023 21:02 UTC

On 14/08/2023 16:41, Scott Lurndal wrote:
> gazelle@shell.xmission.com (Kenny McCormack) writes:
>> In article <874jl1j4rh.fsf@bsb.me.uk>,
>> Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>> ...
>>> Agreed. And newer programs will follow the ancient convention. The
>>> distinction, it seems to me, is not age but purpose. If you can easily
>>> see a program being used in a pipeline, it should silently read stdin,
>>
>> No. As I mentioned earlier, if "cat" (et al) was being designed today, it
>> wouldn't work like that.
>
> Why do you believe that?
>

$ cat a.c b.c - <c.c >abc.c

What's not to love?

Re: Piping to stdin

<OOwCM.87864$RDRe.32841@fx06.iad>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27631&group=comp.lang.c#27631

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx06.iad.POSTED!not-for-mail
X-newsreader: xrn 9.03-beta-14-64bit
Sender: scott@dragon.sl.home (Scott Lurndal)
From: sco...@slp53.sl.home (Scott Lurndal)
Reply-To: slp53@pacbell.net
Subject: Re: Piping to stdin
Newsgroups: comp.unix.programmer,comp.lang.c
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <1b350m483g.fsf@pfeifferfamily.net> <0w6WGGu9VBM2TDE0F@bongo-ra.co> <874jl1j4rh.fsf@bsb.me.uk> <ubd359$3i4qq$2@news.xmission.com> <sWrCM.59049$m8Ke.15249@fx08.iad> <ube4oj$2ffk8$1@dont-email.me>
Lines: 24
Message-ID: <OOwCM.87864$RDRe.32841@fx06.iad>
X-Complaints-To: abuse@usenetserver.com
NNTP-Posting-Date: Mon, 14 Aug 2023 21:14:22 UTC
Organization: UsenetServer - www.usenetserver.com
Date: Mon, 14 Aug 2023 21:14:22 GMT
X-Received-Bytes: 1574
 by: Scott Lurndal - Mon, 14 Aug 2023 21:14 UTC

Richard Harnden <richard.nospam@gmail.com> writes:
>On 14/08/2023 16:41, Scott Lurndal wrote:
>> gazelle@shell.xmission.com (Kenny McCormack) writes:
>>> In article <874jl1j4rh.fsf@bsb.me.uk>,
>>> Ben Bacarisse <ben.usenet@bsb.me.uk> wrote:
>>> ...
>>>> Agreed. And newer programs will follow the ancient convention. The
>>>> distinction, it seems to me, is not age but purpose. If you can easily
>>>> see a program being used in a pipeline, it should silently read stdin,
>>>
>>> No. As I mentioned earlier, if "cat" (et al) was being designed today, it
>>> wouldn't work like that.
>>
>> Why do you believe that?
>>
>
>$ cat a.c b.c - <c.c >abc.c
>
>What's not to love?

Exactly.

$ nroff -mm docbody.mm | cat docheader.txt - doctrailer.txt > document

Re: Piping to stdin

<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27633&group=comp.lang.c#27633

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: grschm...@acm.org (Gary R. Schmidt)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 12:50:33 +1000
Lines: 17
Message-ID: <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net 5MP3rUlLJjRlYv3DmiU5LAwKjk2WmbuehShEWJQxjmst4/wI8=
X-Orig-Path: paranoia.mcleod-schmidt.id.au!not-for-mail
Cancel-Lock: sha1:+YrlWTuLBOpDjlqdGdD9KaabCLk= sha256:/qb6LBsuq1KAmU3gBpr8ZGkBPpab5eVcBpkvyFnPjAQ=
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Betterbird/102.14.0
Content-Language: en-AU
In-Reply-To: <ubdgcv$2carp$2@dont-email.me>
X-Clacks-Overhead: GNU Terry Pratchett
 by: Gary R. Schmidt - Tue, 15 Aug 2023 02:50 UTC

On 15/08/2023 01:14, Kalevi Kolttonen wrote:
> In comp.unix.programmer Kenny McCormack <gazelle@shell.xmission.com> wrote:
>> You know that - and I know that - but do they know that?
>
> It makes no difference. In the real world nobody has
> files named '-'.
>
> br,
> KK

Ahah! You don't have users, do you?

No doubt you also don't encounter filenames with spaces in them, or
carriage returns, or other garbage.

Cheers,
Gary B-)

Re: Piping to stdin

<20230814215312.550@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27634&group=comp.lang.c#27634

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 04:59:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 39
Message-ID: <20230814215312.550@kylheku.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me>
<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
Injection-Date: Tue, 15 Aug 2023 04:59:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12961595d97071749275a1c93b8d4ac5";
logging-data="2840155"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18hNAhXucqzjfdgmd5PIiMvOeAqQ+CqbnQ="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:u+rPsmavfxzqqChib02hPSmNigY=
 by: Kaz Kylheku - Tue, 15 Aug 2023 04:59 UTC

On 2023-08-15, Gary R. Schmidt <grschmidt@acm.org> wrote:
> On 15/08/2023 01:14, Kalevi Kolttonen wrote:
>> In comp.unix.programmer Kenny McCormack <gazelle@shell.xmission.com> wrote:
>>> You know that - and I know that - but do they know that?
>>
>> It makes no difference. In the real world nobody has
>> files named '-'.
>>
>> br,
>> KK
>
> Ahah! You don't have users, do you?
>
> No doubt you also don't encounter filenames with spaces in them, or
> carriage returns, or other garbage.

The interesction of:

- Users who make filenames like "-foo" and "monthly forecast.xls"

- Users who sit in a POSIX shell expanding wildcards like *
in the same directory.

is probababy vanishingly nil, and the subset of those who do the
above in the same directory is even smaller.

Now admin scripts do have to handle the files created by the goofy users
in the first category.

Admin scripts don't ahve to worry about users creating a file
called -, because admin scripts won't be run in the directory
where the user did that. Not even scripts which do process
paths traversing that directory. The admin (or cron, or systemd or
whatever) will run those from somewhere else.

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

Re: Piping to stdin

<877cpwn84m.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27635&group=comp.lang.c#27635

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Mon, 14 Aug 2023 23:15:53 -0700
Organization: None to speak of
Lines: 37
Message-ID: <877cpwn84m.fsf@nosuchdomain.example.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me>
<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<20230814215312.550@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="09fbea63c7f3f6d2cf54fb60a378c312";
logging-data="2860257"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX196QfHXAErrYmItWIYRrmCf"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:DW7KjUMdengAzWRR0ypgLdKdSX0=
sha1:+I3fSgakE+eGw93GKWp59qlT7vw=
 by: Keith Thompson - Tue, 15 Aug 2023 06:15 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:
> On 2023-08-15, Gary R. Schmidt <grschmidt@acm.org> wrote:
>> On 15/08/2023 01:14, Kalevi Kolttonen wrote:
>>> In comp.unix.programmer Kenny McCormack <gazelle@shell.xmission.com> wrote:
>>>> You know that - and I know that - but do they know that?
>>>
>>> It makes no difference. In the real world nobody has
>>> files named '-'.
>>>
>>> br,
>>> KK
>>
>> Ahah! You don't have users, do you?
>>
>> No doubt you also don't encounter filenames with spaces in them, or
>> carriage returns, or other garbage.
>
> The interesction of:
>
> - Users who make filenames like "-foo" and "monthly forecast.xls"
>
> - Users who sit in a POSIX shell expanding wildcards like *
> in the same directory.
>
> is probababy vanishingly nil, and the subset of those who do the
> above in the same directory is even smaller.

Don't forget about users who need to deal with files with arbitrary
names, and who often find it convenient to `cd` to a directory
containing such files.

[...]

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

Re: Piping to stdin

<wwvleeceobt.fsf@LkoBDZeT.terraraq.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27636&group=comp.lang.c#27636

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!news.nntp4.net!nntp.terraraq.uk!.POSTED.tunnel.sfere.anjou.terraraq.org.uk!not-for-mail
From: inva...@invalid.invalid (Richard Kettlewell)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 08:50:46 +0100
Organization: terraraq NNTP server
Message-ID: <wwvleeceobt.fsf@LkoBDZeT.terraraq.uk>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me>
<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<20230814215312.550@kylheku.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: innmantic.terraraq.uk; posting-host="tunnel.sfere.anjou.terraraq.org.uk:172.17.207.6";
logging-data="29741"; mail-complaints-to="usenet@innmantic.terraraq.uk"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:7UlrVEEZ2C7wvXMP6RedoSIehZM=
X-Face: h[Hh-7npe<<b4/eW[]sat,I3O`t8A`(ej.H!F4\8|;ih)`7{@:A~/j1}gTt4e7-n*F?.Rl^
F<\{jehn7.KrO{!7=:(@J~]<.[{>v9!1<qZY,{EJxg6?Er4Y7Ng2\Ft>Z&W?r\c.!4DXH5PWpga"ha
+r0NzP?vnz:e/knOY)PI-
X-Boydie: NO
 by: Richard Kettlewell - Tue, 15 Aug 2023 07:50 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:
> On 2023-08-15, Gary R. Schmidt <grschmidt@acm.org> wrote:
>> Ahah! You don't have users, do you?
>>
>> No doubt you also don't encounter filenames with spaces in them, or
>> carriage returns, or other garbage.
>
> The interesction of:
>
> - Users who make filenames like "-foo" and "monthly forecast.xls"
>
> - Users who sit in a POSIX shell expanding wildcards like *
> in the same directory.
>
> is probababy vanishingly nil, and the subset of those who do the
> above in the same directory is even smaller.

The cases I’ve encountered are where someone accidentally creates a file
with a weird name (starts with - or whatever) and then has trouble
deleting it. I don’t think they got as far as having accidents with
wildcards in the cases I remember, but the basic setup of a file with a
ridiculous name and a non-expert user does happen occasionally.

> Now admin scripts do have to handle the files created by the goofy
> users in the first category.
>
> Admin scripts don't ahve to worry about users creating a file called
> -, because admin scripts won't be run in the directory where the user
> did that. Not even scripts which do process paths traversing that
> directory. The admin (or cron, or systemd or whatever) will run those
> from somewhere else.

The usual example of an ‘admin script’ that has to deal with bizarre
user-created file is a /tmp cleaner. Not quite the same issue as we
started with here but depending on how experienced the script author is
there is plenty of room for accidental or adversarial mischief.

--
https://www.greenend.org.uk/rjk/

Dealing with weird filenames (Was: Piping to stdin)

<ubfbu7$3ja4p$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27638&group=comp.lang.c#27638

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Dealing with weird filenames (Was: Piping to stdin)
Date: Tue, 15 Aug 2023 08:10:47 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubfbu7$3ja4p$1@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au> <20230814215312.550@kylheku.com> <wwvleeceobt.fsf@LkoBDZeT.terraraq.uk>
Injection-Date: Tue, 15 Aug 2023 08:10:47 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3778713"; 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 - Tue, 15 Aug 2023 08:10 UTC

In article <wwvleeceobt.fsf@LkoBDZeT.terraraq.uk>,
Richard Kettlewell <invalid@invalid.invalid> wrote:
....
>The cases I've encountered are where someone accidentally creates a file
>with a weird name (starts with - or whatever) and then has trouble
>deleting it. I don't think they got as far as having accidents with
>wildcards in the cases I remember, but the basic setup of a file with a
>ridiculous name and a non-expert user does happen occasionally.

This is a situation where using a GUI file manager (Windows Explorer
equivalent - whatever they are calling it in Unix/Linux these days).
Weirdly named files are no problem to delete from a GUI, since no shell is
involved.

--
If Jeb is Charlie Brown kicking a football-pulled-away, Mitt is a '50s
housewife with a black eye who insists to her friends the roast wasn't
dry.

Re: Piping to stdin

<ubfus8$2rc7s$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27670&group=comp.lang.c#27670

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 15:34:00 +0200
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <ubfus8$2rc7s$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<20230814215312.550@kylheku.com> <wwvleeceobt.fsf@LkoBDZeT.terraraq.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 15 Aug 2023 13:34:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="10ce11f68d8c291ce7348f2f767658cc";
logging-data="2994428"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UrTqLUkQzffNq85NmV8cIUzvl3lRxDFY="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.0
Cancel-Lock: sha1:Cuxhq8p8RpHLIYsZz+jIgKmP3OI=
Content-Language: en-GB
In-Reply-To: <wwvleeceobt.fsf@LkoBDZeT.terraraq.uk>
 by: David Brown - Tue, 15 Aug 2023 13:34 UTC

On 15/08/2023 09:50, Richard Kettlewell wrote:
> Kaz Kylheku <864-117-4973@kylheku.com> writes:
>> On 2023-08-15, Gary R. Schmidt <grschmidt@acm.org> wrote:
>>> Ahah! You don't have users, do you?
>>>
>>> No doubt you also don't encounter filenames with spaces in them, or
>>> carriage returns, or other garbage.
>>
>> The interesction of:
>>
>> - Users who make filenames like "-foo" and "monthly forecast.xls"
>>
>> - Users who sit in a POSIX shell expanding wildcards like *
>> in the same directory.
>>
>> is probababy vanishingly nil, and the subset of those who do the
>> above in the same directory is even smaller.
>
> The cases I’ve encountered are where someone accidentally creates a file
> with a weird name (starts with - or whatever) and then has trouble
> deleting it. I don’t think they got as far as having accidents with
> wildcards in the cases I remember, but the basic setup of a file with a
> ridiculous name and a non-expert user does happen occasionally.
>

It's usually sufficient just to put the awkward name inside quotation marks.

Re: Piping to stdin

<ubg25m$2rr3g$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27677&group=comp.lang.c#27677

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 14:30:14 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 32
Sender: <untosten@0.0.0.0>
Message-ID: <ubg25m$2rr3g$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com> <20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com> <ubdgcv$2carp$2@dont-email.me> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
Injection-Date: Tue, 15 Aug 2023 14:30:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7ec138b6644db226e9ac07c06a0689d0";
logging-data="3009648"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/bbY3ovfO7SZPJHiCx4L00NcXcUz2Sj+Y="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.4.9-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:alLBmnbM1zc/TBdxJcSaWZce6n0=
 by: Kalevi Kolttonen - Tue, 15 Aug 2023 14:30 UTC

In comp.unix.programmer Gary R. Schmidt <grschmidt@acm.org> wrote:
> On 15/08/2023 01:14, Kalevi Kolttonen wrote:
> Ahah! You don't have users, do you?

No, I no longer have users. However, I used to have
50 000 - 60 000 users, but only a tiny minority
of them had Unix shell access. The vast majority
was email users.

I certainly never ever encountered anyone
with filename or email folder name being '-'.

> No doubt you also don't encounter filenames with
> spaces in them, or carriage returns, or other
> garbage.

That is a terrible and unjustified comparison
as filenams with spaces are very common indeed.

The "problem" of having '-' as a filename is
a complete non-issue that only has theoretical
interest. On Unix, no matter which stdin
convention you choose, you run the risk of
someone having that convention as a filename.

On Unix, it used to be the case that only
NUL-characters and '/' were out of question. I
suppose some filesystems place more restrictions
on filenames nowadays.

br,
KK

Re: Piping to stdin

<2ead585d-4d20-4d78-9183-f0ccf5055bedn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27685&group=comp.lang.c#27685

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:18a7:b0:403:a063:3ae5 with SMTP id v39-20020a05622a18a700b00403a0633ae5mr130903qtc.10.1692111762987;
Tue, 15 Aug 2023 08:02:42 -0700 (PDT)
X-Received: by 2002:a17:902:6bc1:b0:1bb:d27f:ac46 with SMTP id
m1-20020a1709026bc100b001bbd27fac46mr4797138plt.2.1692111762393; Tue, 15 Aug
2023 08:02:42 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.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.lang.c
Date: Tue, 15 Aug 2023 08:02:41 -0700 (PDT)
In-Reply-To: <slrnudkokv.7u3.jj@iridium.wf32df>
Injection-Info: google-groups.googlegroups.com; posting-host=199.203.251.52; posting-account=ow8VOgoAAAAfiGNvoH__Y4ADRwQF1hZW
NNTP-Posting-Host: 199.203.251.52
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<mc7CM.741128$GMN3.387092@fx16.iad> <87r0o6mqme.fsf@nosuchdomain.example.com>
<ubbugh$3hium$2@news.xmission.com> <slrnudkokv.7u3.jj@iridium.wf32df>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <2ead585d-4d20-4d78-9183-f0ccf5055bedn@googlegroups.com>
Subject: Re: Piping to stdin
From: already5...@yahoo.com (Michael S)
Injection-Date: Tue, 15 Aug 2023 15:02:42 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1882
 by: Michael S - Tue, 15 Aug 2023 15:02 UTC

On Monday, August 14, 2023 at 8:21:49 PM UTC+3, Jim Jackson wrote:
> > .... Given that -? is kind of a
> > standard in the Windows world, many programs that get ported over to
> > Unix from Windows, will have this misfeature.
> >
> Command line programs ported from Windows to Unix !!!!! Sounds like an
> oxymoron to me :-)
>
> Do you have some in mind?

Probably many thousands of programs every year. Almost exclusively in-house
stuff so you will never see them.

I ported one less than a year ago. Would have ported another one if had
time and wasn't lazy.

Re: Piping to stdin

<ubg4no$8kb$1@milena.home.net.it>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27688&group=comp.lang.c#27688

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lsod...@home.net.it (Giovanni)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 17:14:00 +0200
Organization: G. Falzoni Home Network
Lines: 20
Message-ID: <ubg4no$8kb$1@milena.home.net.it>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<ubg25m$2rr3g$1@dont-email.me>
Reply-To: gfalzoni@inwind.it
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: dont-email.me; posting-host="0cfd570879d37e3fab67135992155a2d";
logging-data="3029959"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Ovnmo9ZHyR8s7kNqTtdykMMlBdTGvJ29Fr0tgsJHNCg=="
Cancel-Lock: sha1:Lfb1Z1cTabmWaIY4cqjZi88fdik=
 by: Giovanni - Tue, 15 Aug 2023 15:14 UTC

On 8/15/23 16:30, Kalevi Kolttonen wrote:
> On Unix, it used to be the case that only
> NUL-characters and '/' were out of question. I
> suppose some filesystems place more restrictions
> on filenames nowadays.

There are still no restriction on file names. It`s only a problem of the
program. If it expects a file name as input, it has to test if the
argument passed is - in which case it reads from stdin. And, usually,
this works even if the file system has in the current directory a file
named -

To use the file - you should pass it to the program as ./-

Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
< https://giovanni.homelinux.net/ >

Re: Piping to stdin

<ubg6o7$3jrsn$1@news.xmission.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27696&group=comp.lang.c#27696

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 15:48:23 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <ubg6o7$3jrsn$1@news.xmission.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au> <ubg25m$2rr3g$1@dont-email.me> <ubg4no$8kb$1@milena.home.net.it>
Injection-Date: Tue, 15 Aug 2023 15:48:23 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3796887"; 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 - Tue, 15 Aug 2023 15:48 UTC

In article <ubg4no$8kb$1@milena.home.net.it>,
Giovanni <gfalzoni@inwind.it> wrote:
>On 8/15/23 16:30, Kalevi Kolttonen wrote:
>> On Unix, it used to be the case that only
>> NUL-characters and '/' were out of question. I
>> suppose some filesystems place more restrictions
>> on filenames nowadays.
>
>There are still no restriction on file names. It`s only a problem of the
>program. If it expects a file name as input, it has to test if the
>argument passed is - in which case it reads from stdin. And, usually,
>this works even if the file system has in the current directory a file
>named -
>
>To use the file - you should pass it to the program as ./-

Yes, as noted, you know that.

And I know that.

And even Kalevi knows that.

But do they know that???

--
The randomly chosen signature file that would have appeared here is more than 4
lines long. As such, it violates one or more Usenet RFCs. In order to remain
in compliance with said RFCs, the actual sig can be found at the following URL:
http://user.xmission.com/~gazelle/Sigs/Aspergers

Re: Piping to stdin

<87bkf848xw.fsf@fatphil.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27697&group=comp.lang.c#27697

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pc+use...@asdf.org (Phil Carmody)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 18:33:15 +0300
Organization: A noiseless patient Spider
Lines: 33
Message-ID: <87bkf848xw.fsf@fatphil.org>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me>
<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<ubg25m$2rr3g$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="9176dbab4427e178b28c3a609a56f3cb";
logging-data="3041218"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19ZXOq/TiBQ1BBzGQDndZjB"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)
Cancel-Lock: sha1:yXbScpW0txBvO5iUPSesVs6Mg4c=
sha1:FgLvbDJ/j95lD/Vnjw0+knNjvP4=
 by: Phil Carmody - Tue, 15 Aug 2023 15:33 UTC

kalevi@kolttonen.fi (Kalevi Kolttonen) writes:
> The "problem" of having '-' as a filename is
> a complete non-issue that only has theoretical
> interest. On Unix, no matter which stdin
> convention you choose, you run the risk of
> someone having that convention as a filename.

Not everything is a valid filename in unix. If you can exclude the
possibility of accepting a directory, then you could have adopted
something that could only be a directory as the placeholder, such as
'.', or '/', or '-/', or .... Ooof, technically you could use '',
as that's a forbidden filename too, but I'm not suggesting that.

> On Unix, it used to be the case that only
> NUL-characters and '/' were out of question. I
> suppose some filesystems place more restrictions
> on filenames nowadays.

There are many contexts where certain characters have special meanings,
and so it makes sense to avoid them in filenames (colons spring to mind,
but of course some shell characters). However, sense has never been a
proven property of the modern computer user. At least the order of
command processing is mostly sane, so that you can't use malicious
filenames to inject shell metacharacters into commandlines, it's only
the programs being executed that could get confused by what they
receive.

Phil
--
We are no longer hunters and nomads. No longer awed and frightened, as we have
gained some understanding of the world in which we live. As such, we can cast
aside childish remnants from the dawn of our civilization.
-- NotSanguine on SoylentNews, after Eugen Weber in /The Western Tradition/

Re: Piping to stdin

<ubg853$2ssj8$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27705&group=comp.lang.c#27705

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 16:12:19 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 23
Sender: <untosten@0.0.0.0>
Message-ID: <ubg853$2ssj8$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au> <ubg25m$2rr3g$1@dont-email.me> <ubg4no$8kb$1@milena.home.net.it> <ubg6o7$3jrsn$1@news.xmission.com>
Injection-Date: Tue, 15 Aug 2023 16:12:19 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7ec138b6644db226e9ac07c06a0689d0";
logging-data="3043944"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/PsN3hM979B6dpfFa3taoHwHNmMjjqI+E="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.4.9-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:H9E1IW4V6FCcNM8kQcp5U8XAeqE=
 by: Kalevi Kolttonen - Tue, 15 Aug 2023 16:12 UTC

Kenny McCormack <gazelle@shell.xmission.com> wrote:
> But do they know that???

"They" probably don't know it. But let's face it,
nobody really wants to create a file having '-'
filename on purpose. The filename is not descriptive
at all, it would be just an insane choice for anything
useful.

It could happen by accident, but even that is quite
unlikely.

If "they" don't know how to delete it, there is no need
to panic. The file's existence does no harm. "They" can
always ask for help and someone will tell them how
to get rid of it.

I guess the stdin convention '-' is decades old.
It was chosen because they had pick something that
is short and not likely to exist as a real file.

br,
KK

Re: Piping to stdin

<ubg8a8$2t20l$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27706&group=comp.lang.c#27706

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Mutt...@dastardlyhq.com
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 16:15:04 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <ubg8a8$2t20l$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au> <ubg25m$2rr3g$1@dont-email.me> <ubg4no$8kb$1@milena.home.net.it> <ubg6o7$3jrsn$1@news.xmission.com> <ubg853$2ssj8$1@dont-email.me>
Injection-Date: Tue, 15 Aug 2023 16:15:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d3412f0fd6cc97720201a731a306381f";
logging-data="3049493"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/+3EbtNp+5jGHr04btsY+h"
Cancel-Lock: sha1:gk73wjT5/YbRgOmSLRvdUhFl1vc=
 by: Mutt...@dastardlyhq.com - Tue, 15 Aug 2023 16:15 UTC

On Tue, 15 Aug 2023 16:12:19 -0000 (UTC)
kalevi@kolttonen.fi (Kalevi Kolttonen) wrote:
>Kenny McCormack <gazelle@shell.xmission.com> wrote:
>> But do they know that???
>
>"They" probably don't know it. But let's face it,
>nobody really wants to create a file having '-'
>filename on purpose. The filename is not descriptive
>at all, it would be just an insane choice for anything
>useful.

I used to think the same thing about spaces in filenames. Then along came
Windows.

Re: Piping to stdin

<ubg8no$2t2as$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27707&group=comp.lang.c#27707

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: kal...@kolttonen.fi (Kalevi Kolttonen)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 16:22:16 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Sender: <untosten@0.0.0.0>
Message-ID: <ubg8no$2t2as$1@dont-email.me>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com> <vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au> <ubg25m$2rr3g$1@dont-email.me> <ubg4no$8kb$1@milena.home.net.it> <ubg6o7$3jrsn$1@news.xmission.com> <ubg853$2ssj8$1@dont-email.me> <ubg8a8$2t20l$1@dont-email.me>
Injection-Date: Tue, 15 Aug 2023 16:22:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="7ec138b6644db226e9ac07c06a0689d0";
logging-data="3049820"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX195bIexprEVjkHU/NP9K59BRFbICwcSmdc="
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.4.9-200.fc38.x86_64 (x86_64))
Cancel-Lock: sha1:GgAbFVzy196mycShbmM8D3rKmsU=
 by: Kalevi Kolttonen - Tue, 15 Aug 2023 16:22 UTC

In comp.unix.programmer Muttley@dastardlyhq.com wrote:
> On Tue, 15 Aug 2023 16:12:19 -0000 (UTC)
> kalevi@kolttonen.fi (Kalevi Kolttonen) wrote:
>>Kenny McCormack <gazelle@shell.xmission.com> wrote:
>>> But do they know that???
>>
>>"They" probably don't know it. But let's face it,
>>nobody really wants to create a file having '-'
>>filename on purpose. The filename is not descriptive
>>at all, it would be just an insane choice for anything
>>useful.
>
> I used to think the same thing about spaces in filenames. Then along came
> Windows.

Filenames having spaces versus the stdin convention '-' is
comparing two things that are very different.

The first one is just a way to name files or directories.

The second one is an age-old Unix convention that has
nothing to do with naming real files or directories.

It is best to not to confuse these two distinct ideas.

br,
KK

Re: Piping to stdin

<20230815102503.811@kylheku.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27712&group=comp.lang.c#27712

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 17:33:42 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <20230815102503.811@kylheku.com>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<ubg25m$2rr3g$1@dont-email.me> <ubg4no$8kb$1@milena.home.net.it>
<ubg6o7$3jrsn$1@news.xmission.com> <ubg853$2ssj8$1@dont-email.me>
<ubg8a8$2t20l$1@dont-email.me>
Injection-Date: Tue, 15 Aug 2023 17:33:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="12961595d97071749275a1c93b8d4ac5";
logging-data="3069671"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19gFnUUof9/OvbDQUhNGiUuByjAjnvo2Sc="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:FjzVDmYcI1cUaTpMQbcQyckfIF4=
 by: Kaz Kylheku - Tue, 15 Aug 2023 17:33 UTC

On 2023-08-15, Muttley@dastardlyhq.com <Muttley@dastardlyhq.com> wrote:
> On Tue, 15 Aug 2023 16:12:19 -0000 (UTC)
> kalevi@kolttonen.fi (Kalevi Kolttonen) wrote:
>>Kenny McCormack <gazelle@shell.xmission.com> wrote:
>>> But do they know that???
>>
>>"They" probably don't know it. But let's face it,
>>nobody really wants to create a file having '-'
>>filename on purpose. The filename is not descriptive
>>at all, it would be just an insane choice for anything
>>useful.
>
> I used to think the same thing about spaces in filenames. Then along came
> Windows.

Windows users typically do not name files "-" either,
in spite of there being spaces in file and directory names.

A program that handles - specially will not be confused when
that occurs in a path like /abc/-/def or ./- or -/ and other
possibilities.

Windows has worse problems, like issues if you try to make
a file called PRN in any directory.

"* Do not use the following reserved names for the name of a file:

CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7,
COM8, COM9, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8,
and LPT9. Also avoid these names followed immediately by an
extension; for example, NUL.txt and NUL.tar.gz are both equivalent
to NUL. For more information, see Namespaces."

In Microsoft Teams, channel names cannot have MS-DOS device names:

https://learn.microsoft.com/en-us/microsoftteams/limits-specifications-teams

"Channel names can't contain the following characters or words:

[...]

Words forms, CON, CONIN$, CONOUT$, PRN, AUX, NUL, COM1 to COM9, LPT1
to LPT9, desktop.ini, _vti_

LOL ...

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

Re: Piping to stdin

<1by1ic2n67.fsf@pfeifferfamily.net>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=27714&group=comp.lang.c#27714

  copy link   Newsgroups: comp.unix.programmer comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pfeif...@cs.nmsu.edu (Joe Pfeiffer)
Newsgroups: comp.unix.programmer,comp.lang.c
Subject: Re: Piping to stdin
Date: Tue, 15 Aug 2023 12:08:48 -0600
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <1by1ic2n67.fsf@pfeifferfamily.net>
References: <9e7a4bd1-bfbb-4df7-af1a-27ca9625e50bn@googlegroups.com>
<LtQSo3SOOU09AXJ1X@bongo-ra.co> <ubbua5$3hium$1@news.xmission.com>
<20230813200644.979@kylheku.com> <ubc63c$3hlul$2@news.xmission.com>
<ubdgcv$2carp$2@dont-email.me>
<vo5rqj-lpl.ln1@paranoia.mcleod-schmidt.id.au>
<20230814215312.550@kylheku.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="16cda29c1a3f534d1a4872782d89356b";
logging-data="3081156"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19PY2g0uI8DjR7ozC3eG0lTOzZAIisJVV0="
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:AVAYCYwkwFTtO23UCPAIbEvj9kI=
sha1:FidN2wjiv6kZBa0pkbEq+kMua30=
 by: Joe Pfeiffer - Tue, 15 Aug 2023 18:08 UTC

Kaz Kylheku <864-117-4973@kylheku.com> writes:

> On 2023-08-15, Gary R. Schmidt <grschmidt@acm.org> wrote:
>> On 15/08/2023 01:14, Kalevi Kolttonen wrote:
>>> In comp.unix.programmer Kenny McCormack <gazelle@shell.xmission.com> wrote:
>>>> You know that - and I know that - but do they know that?
>>>
>>> It makes no difference. In the real world nobody has
>>> files named '-'.
>>>
>>> br,
>>> KK
>>
>> Ahah! You don't have users, do you?
>>
>> No doubt you also don't encounter filenames with spaces in them, or
>> carriage returns, or other garbage.
>
> The interesction of:
>
> - Users who make filenames like "-foo" and "monthly forecast.xls"
>
> - Users who sit in a POSIX shell expanding wildcards like *
> in the same directory.
>
> is probababy vanishingly nil, and the subset of those who do the
> above in the same directory is even smaller.
>
> Now admin scripts do have to handle the files created by the goofy users
> in the first category.
>
> Admin scripts don't ahve to worry about users creating a file
> called -, because admin scripts won't be run in the directory
> where the user did that. Not even scripts which do process
> paths traversing that directory. The admin (or cron, or systemd or
> whatever) will run those from somewhere else.

Though I expect just about everyone has tried to run foo -xyz and
inadvertently run foo - xyz instead, ending up with a file named - and
one named xyz.


devel / comp.lang.c / Re: Piping to stdin

Pages:12345
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor