Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.unix.programmer > #14303 > unrolled thread

Re: Piping to stdin

Started bySpiros Bousbouras <spibou@gmail.com>
First post2023-08-13 13:55 +0000
Last post2023-08-14 21:14 +0000
Articles 11 on this page of 151 — 33 participants

Back to article view | Back to comp.unix.programmer

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Piping to stdin Spiros Bousbouras <spibou@gmail.com> - 2023-08-13 13:55 +0000
    Re: Piping to stdin Spiros Bousbouras <spibou@gmail.com> - 2023-08-13 14:27 +0000
      Re: Piping to stdin gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-14 00:59 +0000
        Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-14 03:07 +0000
          Re: Piping to stdin gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-14 03:12 +0000
            Re: Piping to stdin kalevi@kolttonen.fi (Kalevi Kolttonen) - 2023-08-14 15:14 +0000
              Re: Piping to stdin "Gary R. Schmidt" <grschmidt@acm.org> - 2023-08-15 12:50 +1000
                Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-15 04:59 +0000
                  Re: Piping to stdin Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-08-14 23:15 -0700
                  Re: Piping to stdin Richard Kettlewell <invalid@invalid.invalid> - 2023-08-15 08:50 +0100
                    Dealing with weird filenames (Was: Piping to stdin) gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-15 08:10 +0000
                    Re: Piping to stdin David Brown <david.brown@hesbynett.no> - 2023-08-15 15:34 +0200
                      Re: Piping to stdin Richard Harnden <richard.nospam@gmail.com> - 2023-08-15 19:50 +0100
                        Re: Piping to stdin scott@slp53.sl.home (Scott Lurndal) - 2023-08-15 20:16 +0000
                        Re: Piping to stdin vallor <vallor@cultnix.org> - 2023-08-16 06:34 +0000
                      Re: Piping to stdin Richard Kettlewell <invalid@invalid.invalid> - 2023-08-16 17:39 +0100
                        Re: Piping to stdin scott@slp53.sl.home (Scott Lurndal) - 2023-08-16 17:37 +0000
                          Re: Piping to stdin gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-16 17:43 +0000
                          Re: Piping to stdin Spiros Bousbouras <spibou@gmail.com> - 2023-08-16 19:22 +0000
                            Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-16 20:10 +0000
                              Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-16 20:11 +0000
                          Re: Piping to stdin Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-08-16 13:35 -0700
                            Re: Piping to stdin Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2023-08-17 13:34 +0100
                              Re: Piping to stdin Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-08-17 14:27 -0700
                          Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-17 14:51 +0300
                    Re: Piping to stdin James Kuyper <jameskuyper@alumni.caltech.edu> - 2023-08-16 01:37 -0400
                      Re: Piping to stdin David Brown <david.brown@hesbynett.no> - 2023-08-16 13:14 +0200
                  Re: Piping to stdin Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2023-08-15 12:08 -0600
                    Re: Piping to stdin Richard Harnden <richard.nospam@gmail.com> - 2023-08-16 09:32 +0100
                      Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-16 17:27 +0300
                Re: Piping to stdin kalevi@kolttonen.fi (Kalevi Kolttonen) - 2023-08-15 14:30 +0000
                  Re: Piping to stdin Giovanni <lsodgf0@home.net.it> - 2023-08-15 17:14 +0200
                    Re: Piping to stdin gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-15 15:48 +0000
                      Re: Piping to stdin kalevi@kolttonen.fi (Kalevi Kolttonen) - 2023-08-15 16:12 +0000
                        Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-15 16:15 +0000
                          Re: Piping to stdin kalevi@kolttonen.fi (Kalevi Kolttonen) - 2023-08-15 16:22 +0000
                            Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-17 10:26 +0000
                              Re: Piping to stdin kalevi@kolttonen.fi (Kalevi Kolttonen) - 2023-08-17 14:23 +0000
                                Re: Piping to stdin scott@slp53.sl.home (Scott Lurndal) - 2023-08-17 15:25 +0000
                          Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-15 17:33 +0000
                          Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-15 23:32 +0300
                            Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-17 10:32 +0000
                              Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-17 14:57 +0300
                                Re: Piping to stdin Geoff Clare <geoff@clare.See-My-Signature.invalid> - 2023-08-17 13:49 +0100
                                  Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-17 15:15 +0000
                                Wrecking a good thing? (Was: Piping to stdin) gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-17 14:09 +0000
                                  Re: Wrecking a good thing? Phil Carmody <pc+usenet@asdf.org> - 2023-08-18 00:39 +0300
                                  Re: Wrecking a good thing? (Was: Piping to stdin) David Brown <david.brown@hesbynett.no> - 2023-08-18 11:17 +0200
                                Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-17 15:14 +0000
                              Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-17 13:52 +0000
                                Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-17 15:20 +0000
                                Re: Piping to stdin Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-08-17 13:43 -0700
                                Re: Piping to stdin David Brown <david.brown@hesbynett.no> - 2023-08-18 11:28 +0200
                              Re: Piping to stdin Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-17 21:52 +0100
                                Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-19 13:33 +0300
                                  Re: Piping to stdin Oğuz <oguzismailuysal@gmail.com> - 2023-08-19 16:15 +0300
                                    Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-19 14:48 +0000
                                      Re: Piping to stdin scott@slp53.sl.home (Scott Lurndal) - 2023-08-20 17:24 +0000
                                        Re: Piping to stdin Muttley@dastardlyhq.com - 2023-08-20 19:21 +0000
                                      Re: Piping to stdin Rainer Weikusat <rweikusat@talktalk.net> - 2023-08-20 21:57 +0100
                                        What language is this? (Was: Piping to stdin) gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-20 22:33 +0000
                                          Re: What language is this? (Was: Piping to stdin) scott@slp53.sl.home (Scott Lurndal) - 2023-08-21 01:26 +0000
                                            Re: What language is this? (Was: Piping to stdin) gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-21 02:57 +0000
                                              Re: What language is this? Rainer Weikusat <rweikusat@talktalk.net> - 2023-08-21 17:16 +0100
                                                Re: What language is this? gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-21 19:10 +0000
                                                  Re: What language is this? Rainer Weikusat <rweikusat@talktalk.net> - 2023-08-21 20:31 +0100
                                                    Re: What language is this? gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-21 20:29 +0000
                                                      Re: What language is this? Rainer Weikusat <rweikusat@talktalk.net> - 2023-08-21 21:48 +0100
                                            Re: What language is this? (Was: Piping to stdin) Muttley@dastardlyhq.com - 2023-08-21 06:50 +0000
                                  Re: Piping to stdin Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-19 21:14 +0100
                                    Re: Piping to stdin kalevi@kolttonen.fi (Kalevi Kolttonen) - 2023-08-20 02:02 +0000
                          Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) gazelle@shell.xmission.com (Kenny McCormack) - 2024-08-31 05:57 +0000
                            Re: Long filenames in DOS/Windows and Unix/Linux Richard Kettlewell <invalid@invalid.invalid> - 2024-08-31 09:27 +0100
                              Re: Long filenames in DOS/Windows and Unix/Linux Muttley@dastardlyhq.com - 2024-08-31 08:39 +0000
                              Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-08-31 23:34 +0000
                                Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-01 07:03 +0000
                                  Re: Long filenames in DOS/Windows and Unix/Linux Nuno Silva <nunojsilva@invalid.invalid> - 2024-09-01 09:10 +0100
                                  Re: Long filenames in DOS/Windows and Unix/Linux Helmut Waitzmann <nn.throttle@xoxy.net> - 2024-09-01 19:51 +0200
                                  Putting arbitrary characters into the shell command line (was: Long filenames in DOS/Windows and Unix/Linux) Helmut Waitzmann <nn.throttle@xoxy.net> - 2024-09-01 21:07 +0200
                                  Re: Long filenames in DOS/Windows and Unix/Linux Wayne <wayne@nospam.invalid> - 2024-09-03 13:56 -0400
                                    Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-03 21:54 +0000
                                  Re: Long filenames in DOS/Windows and Unix/Linux Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-09-08 07:24 +0200
                                Arbitrary characters in filenames (was: Long filenames in DOS/Windows and Unix/Linux) Helmut Waitzmann <nn.throttle@xoxy.net> - 2024-09-01 20:06 +0200
                            Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) Muttley@dastardlyhq.com - 2024-08-31 08:37 +0000
                              Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) John Ames <commodorejohn@gmail.com> - 2024-09-03 08:44 -0700
                                Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) scott@slp53.sl.home (Scott Lurndal) - 2024-09-03 15:47 +0000
                                  Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-09-03 15:54 +0000
                                Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) gazelle@shell.xmission.com (Kenny McCormack) - 2024-09-03 16:10 +0000
                                  Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to Muttley@dastardlyhq.com - 2024-09-04 07:27 +0000
                                    User surveys (Was: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to) gazelle@shell.xmission.com (Kenny McCormack) - 2024-09-04 11:27 +0000
                                      Re: User surveys (Was: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to) Muttley@dastardlyhq.com - 2024-09-04 13:12 +0000
                                Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) Kaz Kylheku <643-408-1753@kylheku.com> - 2024-09-03 17:37 +0000
                                  Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) John Ames <commodorejohn@gmail.com> - 2024-09-03 11:39 -0700
                                    Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) Kaz Kylheku <643-408-1753@kylheku.com> - 2024-09-03 20:11 +0000
                                      Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) John Ames <commodorejohn@gmail.com> - 2024-09-03 13:25 -0700
                                        Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) scott@slp53.sl.home (Scott Lurndal) - 2024-09-03 20:34 +0000
                                          Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-03 21:52 +0000
                                        Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-03 15:16 -0700
                                          Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-03 22:18 +0000
                                            Re: Long filenames in DOS/Windows and Unix/Linux scott@slp53.sl.home (Scott Lurndal) - 2024-09-03 22:59 +0000
                                            Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-03 16:10 -0700
                                              Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-03 23:54 +0000
                                                Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-03 17:27 -0700
                                                  Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-04 00:44 +0000
                                                    Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-03 21:36 -0700
                                                      Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-04 07:05 +0000
                                                Re: Long filenames in DOS/Windows and Unix/Linux Ralf Fassel <ralfixx@gmx.de> - 2024-09-04 11:47 +0200
                                                  Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-04 03:44 -0700
                                                    Re: Long filenames in DOS/Windows and Unix/Linux Nuno Silva <nunojsilva@invalid.invalid> - 2024-09-04 13:33 +0100
                                                      Always use "--" (Was: Long filenames in DOS/Windows and Unix/Linux) gazelle@shell.xmission.com (Kenny McCormack) - 2024-09-04 13:04 +0000
                                                        Re: Always use "--" (Was: Long filenames in DOS/Windows and Unix/Linux) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-09-04 13:17 +0000
                                                          Re: Always use "--" (Was: Long filenames in DOS/Windows and Unix/Linux) Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-04 21:35 +0000
                                                          Re: Always use "--" (Was: Long filenames in DOS/Windows and Unix/Linux) Kaz Kylheku <643-408-1753@kylheku.com> - 2024-09-05 02:29 +0000
                                                            Re: Always use "--" (Was: Long filenames in DOS/Windows and Unix/Linux) Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2024-09-05 14:48 +0000
                                              Re: Long filenames in DOS/Windows and Unix/Linux Tim Rentsch <tr.17687@z991.linuxsc.com> - 2024-09-03 17:35 -0700
                                          Re: Long filenames in DOS/Windows and Unix/Linux Kaz Kylheku <643-408-1753@kylheku.com> - 2024-09-03 23:15 +0000
                                            Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-03 16:38 -0700
                                              Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-03 23:56 +0000
                                                Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-03 17:19 -0700
                                                  Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-04 00:41 +0000
                                                    Re: Long filenames in DOS/Windows and Unix/Linux Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2024-09-03 21:29 -0700
                                                      Re: Long filenames in DOS/Windows and Unix/Linux Lawrence D'Oliveiro <ldo@nz.invalid> - 2024-09-04 06:49 +0000
                                                      Re: Long filenames in DOS/Windows and Unix/Linux Nuno Silva <nunojsilva@invalid.invalid> - 2024-09-04 10:16 +0100
                                                  Re: Long filenames in DOS/Windows and Unix/Linux Kaz Kylheku <643-408-1753@kylheku.com> - 2024-09-04 14:30 +0000
                                            Re: Long filenames in DOS/Windows and Unix/Linux John Ames <commodorejohn@gmail.com> - 2024-09-04 08:41 -0700
                                              Re: Long filenames in DOS/Windows and Unix/Linux Muttley@dastardlyhq.com - 2024-09-04 15:57 +0000
                                          Re: Long filenames in DOS/Windows and Unix/Linux Richard Kettlewell <invalid@invalid.invalid> - 2024-09-04 18:03 +0100
                                            Re: Long filenames in DOS/Windows and Unix/Linux Ralf Fassel <ralfixx@gmx.de> - 2024-09-05 11:29 +0200
                                              Re: Long filenames in DOS/Windows and Unix/Linux Richard Kettlewell <invalid@invalid.invalid> - 2024-09-05 18:21 +0100
                                                Re: Long filenames in DOS/Windows and Unix/Linux candycanearter07 <candycanearter07@candycanearter07.nomail.afraid> - 2024-09-07 18:20 +0000
                                                  Word splitting oddities (Was: Long filenames in DOS/Windows and Unix/Linux) gazelle@shell.xmission.com (Kenny McCormack) - 2024-09-07 21:51 +0000
                                              Re: Long filenames in DOS/Windows and Unix/Linux Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-09-10 07:17 +0200
                                    Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2024-09-10 06:51 +0200
                                Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to Muttley@dastardlyhq.com - 2024-09-04 07:31 +0000
                            Re: Long filenames in DOS/Windows and Unix/Linux (Was: Piping to stdin) Marcel Mueller <news.5.maazl@spamgourmet.org> - 2024-09-01 11:44 +0200
                        Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-15 23:24 +0300
                          Re: Piping to stdin Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2023-08-15 20:50 +0000
                            Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-16 17:11 +0300
                              Re: Piping to stdin Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2023-08-16 15:25 +0000
                                Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-16 19:29 +0000
                                Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-17 14:49 +0300
                        Re: Piping to stdin Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-16 03:20 +0100
                  Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-15 18:33 +0300
        Re: Piping to stdin "Nuno Silva" <nunojsilva@invalid.invalid> - 2023-08-14 09:45 +0100
    Re: Piping to stdin Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2023-08-13 21:26 -0600
      Re: Piping to stdin Spiros Bousbouras <spibou@gmail.com> - 2023-08-14 09:24 +0000
        Re: Piping to stdin Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-14 11:29 +0100
          Re: Piping to stdin gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-14 11:28 +0000
            Re: Piping to stdin scott@slp53.sl.home (Scott Lurndal) - 2023-08-14 15:41 +0000
              Re: Piping to stdin Richard Harnden <richard.nospam@gmail.com> - 2023-08-14 22:02 +0100
                Re: Piping to stdin scott@slp53.sl.home (Scott Lurndal) - 2023-08-14 21:14 +0000

Page 8 of 8 — ← Prev page 1 2 3 4 5 6 7 [8]


#14370

FromPhil Carmody <pc+usenet@asdf.org>
Date2023-08-17 14:49 +0300
Message-ID<87350h28j9.fsf@fatphil.org>
In reply to#14351
Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
> On Wed, 16 Aug 2023 17:11:28 +0300, Phil Carmody wrote:
>> Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
>>> On Tue, 15 Aug 2023 23:24:28 +0300, Phil Carmody wrote:
> [snip]
>>>>> 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.
>>>> 
>>>> I propose that '|' might have been better - it's even mnemonic.
>>>
>>> But, '|' conflicts with the shell pipe character, and would need
>>> a workaround in some cases. For example,
>> 
>> It's doing something special, why wouldn't you expect to do something
>> special to make use of it?
>
> Okay, then. How about a counter proposal:
> For Unix shells, the < character indicates redirection of stdin.
> I propose that '<' might have been a better choice as a standard
> program option to flag "read from stdin" than either '|' /or/ '-'
> were.  :-)

Why *better* than '|', rather than *equally good as*, given that the
logic is absolutely equivalent?

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/

[toc] | [prev] | [next] | [standalone]


#14344

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2023-08-16 03:20 +0100
Message-ID<87msyrhgnq.fsf@bsb.me.uk>
In reply to#14334
kalevi@kolttonen.fi (Kalevi Kolttonen) writes:

> 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.

If I were doing this all from scratch, I'd consider choosing /- as the
convention.  It's never a "user" file, and anyone capable of creating it
should know how to remove it.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#14333

FromPhil Carmody <pc+usenet@asdf.org>
Date2023-08-15 18:33 +0300
Message-ID<87bkf848xw.fsf@fatphil.org>
In reply to#14330
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/

[toc] | [prev] | [next] | [standalone]


#14311

From"Nuno Silva" <nunojsilva@invalid.invalid>
Date2023-08-14 09:45 +0100
Message-ID<ubcpj3$28035$1@dont-email.me>
In reply to#14305
On 2023-08-14, Kenny McCormack wrote:

> In article <LtQSo3SOOU09AXJ1X@bongo-ra.co>,
> Spiros Bousbouras  <spibou@gmail.com> wrote:
> ...
>>> So conventionally the file name is "-"? 
>>
>>Yes.
>
> Yes, but, as indicated, it is just that - a convention.  The program has to
> recognize it, and act accordingly.  Note, incidentally, that it raises the
> question of "What if the user actually has a file named '-' ?"
>
> By the way, I wish to point out that, despite all the passion some here
> have argued with, the idea that a program *must* read stdin if no args are
> given, is a) not absolute and b) basically old-fashioned.  The newer model
> is, as Malcolm would like it to be, that running a program with no args
> *should* generate a usage message.  Among other things, the user should not
> have to guess what the "help" option is. Is it -h, -?, --help, or something
> else???

If you consider acceptable a convention of showing usage when no
arguments are given, then why not a convention on what to call the help
option?

I'd also argue that there's what should be a more uniform way to get
documentation on utilities: the online manual. Or (seeing this was from
comp.lang.c) is this also about running on systems where there might be
no such manual facility?

-- 
Nuno Silva
(I'm not reading comp.lang.c, so it's possible I'm lacking some context)

[toc] | [prev] | [next] | [standalone]


#14309

FromJoe Pfeiffer <pfeiffer@cs.nmsu.edu>
Date2023-08-13 21:26 -0600
Message-ID<1b350m483g.fsf@pfeifferfamily.net>
In reply to#14303
Spiros Bousbouras <spibou@gmail.com> writes:

> [ Followup-To: comp.unix.programmer ]
>
> On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
> Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
>> On Unix-lke systems, what is the convention for putting a program into a
>> mode where it accepts input from stdin?
>> Where the user invokes it directly, he'll normally want input from a file. So
>> the normal invocation would be
>> 
>> myprogram myinput.txt
>> 
>> But if he just types "myprogram" it should display brief help text.  So we 
>> can't omit the filename to make the program read from stdin.
>
> I would use a  -h  option for help text and with no arguments it should read
> from stdin .

No, the typical user will expect help text from just typing the command
name (notwithstanding ancient programs like cat).  I typically treat no
args the same as -h

>> So do you pass an option
>> 
>> myprogram -stdin
>> 
>> or what is the normal way of solving this?
>
> - (a single dash) as argument. Even if the programme accepts multiple file
> name arguments , a single dash among those means "read from stdin".

Yes, this is what seems common.

[toc] | [prev] | [next] | [standalone]


#14312

FromSpiros Bousbouras <spibou@gmail.com>
Date2023-08-14 09:24 +0000
Message-ID<0w6WGGu9VBM2TDE0F@bongo-ra.co>
In reply to#14309
On Sun, 13 Aug 2023 21:26:59 -0600
Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
> Spiros Bousbouras <spibou@gmail.com> writes:
> 
> > [ Followup-To: comp.unix.programmer ]
> >
> > On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
> > Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
> >> On Unix-lke systems, what is the convention for putting a program into a
> >> mode where it accepts input from stdin?
> >> Where the user invokes it directly, he'll normally want input from a file. So
> >> the normal invocation would be
> >> 
> >> myprogram myinput.txt
> >> 
> >> But if he just types "myprogram" it should display brief help text.  So we 
> >> can't omit the filename to make the program read from stdin.
> >
> > I would use a  -h  option for help text and with no arguments it should read
> > from stdin .
> 
> No, the typical user will expect help text from just typing the command
> name (notwithstanding ancient programs like cat).  I typically treat no
> args the same as -h

Not to mention  grep , awk , sed , sort , bc , od , etc. Being "ancient"
means that their conventions are more firmly established so why would a
user expect something else ?

[toc] | [prev] | [next] | [standalone]


#14315

FromBen Bacarisse <ben.usenet@bsb.me.uk>
Date2023-08-14 11:29 +0100
Message-ID<874jl1j4rh.fsf@bsb.me.uk>
In reply to#14312
Spiros Bousbouras <spibou@gmail.com> writes:

> On Sun, 13 Aug 2023 21:26:59 -0600
> Joe Pfeiffer <pfeiffer@cs.nmsu.edu> wrote:
>> Spiros Bousbouras <spibou@gmail.com> writes:
>> 
>> > [ Followup-To: comp.unix.programmer ]
>> >
>> > On Sun, 13 Aug 2023 06:42:17 -0700 (PDT)
>> > Malcolm McLean <malcolm.arthur.mclean@gmail.com> wrote:
>> >> On Unix-lke systems, what is the convention for putting a program into a
>> >> mode where it accepts input from stdin?
>> >> Where the user invokes it directly, he'll normally want input from a file. So
>> >> the normal invocation would be
>> >> 
>> >> myprogram myinput.txt
>> >> 
>> >> But if he just types "myprogram" it should display brief help text.  So we 
>> >> can't omit the filename to make the program read from stdin.
>> >
>> > I would use a  -h  option for help text and with no arguments it should read
>> > from stdin .
>> 
>> No, the typical user will expect help text from just typing the command
>> name (notwithstanding ancient programs like cat).  I typically treat no
>> args the same as -h
>
> Not to mention  grep , awk , sed , sort , bc , od , etc. Being "ancient"
> means that their conventions are more firmly established so why would a
> user expect something else ?

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,
but if that usage is rare, it should interpret '-' as a convention for
reading stdin.

For example, gcc on it's own complains, but

  echo "int f() { return 1; }" | gcc -S -xc - -o -

works as expected.

-- 
Ben.

[toc] | [prev] | [next] | [standalone]


#14316

Fromgazelle@shell.xmission.com (Kenny McCormack)
Date2023-08-14 11:28 +0000
Message-ID<ubd359$3i4qq$2@news.xmission.com>
In reply to#14315
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

[toc] | [prev] | [next] | [standalone]


#14318

Fromscott@slp53.sl.home (Scott Lurndal)
Date2023-08-14 15:41 +0000
Message-ID<sWrCM.59049$m8Ke.15249@fx08.iad>
In reply to#14316
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?

[toc] | [prev] | [next] | [standalone]


#14322

FromRichard Harnden <richard.nospam@gmail.com>
Date2023-08-14 22:02 +0100
Message-ID<ube4oj$2ffk8$1@dont-email.me>
In reply to#14318
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?

[toc] | [prev] | [next] | [standalone]


#14323

Fromscott@slp53.sl.home (Scott Lurndal)
Date2023-08-14 21:14 +0000
Message-ID<OOwCM.87864$RDRe.32841@fx06.iad>
In reply to#14322
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

[toc] | [prev] | [standalone]


Page 8 of 8 — ← Prev page 1 2 3 4 5 6 7 [8]

Back to top | Article view | comp.unix.programmer


csiph-web