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


Groups > comp.unix.programmer > #14313

Re: Piping to stdin

From Phil Carmody <pc+usenet@asdf.org>
Newsgroups comp.lang.c, comp.unix.programmer
Subject Re: Piping to stdin
Date 2023-08-14 12:20 +0300
Organization A noiseless patient Spider
Message-ID <87o7ja3rpp.fsf@fatphil.org> (permalink)
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>

Cross-posted to 2 groups.

Show all headers | View raw


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.

So if I want to grep case-insensitively for whole words, and have line
numbers printed with the matched lines - in other words, on the unix
version I'm doing ``grep -win ...'' - should my system installation
arrange for /win to not be a path?

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/

Back to comp.unix.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: Piping to stdin gazelle@shell.xmission.com (Kenny McCormack) - 2023-08-14 01:03 +0000
  Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-14 04:00 +0000
    Re: Piping to stdin Phil Carmody <pc+usenet@asdf.org> - 2023-08-14 12:20 +0300
    Re: Piping to stdin Keith Thompson <Keith.S.Thompson+u@gmail.com> - 2023-08-14 02:44 -0700
      Re: Piping to stdin Kaz Kylheku <864-117-4973@kylheku.com> - 2023-08-14 15:49 +0000
        Re: Piping to stdin Ben Bacarisse <ben.usenet@bsb.me.uk> - 2023-08-14 17:19 +0100
  Re: Piping to stdin Jim Jackson <jj@franjam.org.uk> - 2023-08-14 17:21 +0000

csiph-web