Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Base 8 is just like base 10, if you are missing two fingers. -- Tom Lehrer


devel / comp.unix.programmer / Re: Piping to stdin

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

Pages:1234
Re: Piping to stdin

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10845&group=comp.unix.programmer#10845

  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=10846&group=comp.unix.programmer#10846

  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=10847&group=comp.unix.programmer#10847

  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=10848&group=comp.unix.programmer#10848

  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=10849&group=comp.unix.programmer#10849

  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=10850&group=comp.unix.programmer#10850

  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=10851&group=comp.unix.programmer#10851

  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

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

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10852&group=comp.unix.programmer#10852

  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=10853&group=comp.unix.programmer#10853

  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=10854&group=comp.unix.programmer#10854

  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=10855&group=comp.unix.programmer#10855

  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=10856&group=comp.unix.programmer#10856

  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.

Pages:1234
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor