On Tue, Mar 2, 2010 at 10:44 PM, Glenn Skinner <glenn.skinner at covad.net> 
wrote:
> On Mar 2, 2010, at 12:55 PM, Garrett D'Amore - sun microsystems wrote:
>
>> This project is an amendment to the Korn Shell 93 Integration project
>> (PSARC/2006/550 and PSARC/2007/035, PSARC/2008/094, PSARC/2008/344
>> and PSARC/2008/589) specifying the following additional
>> interfaces:
>> Addition of /usr/bin/xgrep
>>
>> Bug/RFE Number(s):
>>
>> 6929154  RFE: Add /usr/bin/xgrep (Augmented regular expressions
>>        (conjunction, negation.))
>>
>>
>> Interface                    Stability        Description
>> ---------                    ---------        -----------
>> /usr/bin/xgrep               Committed        xgrep command
>> ksh93 'xgrep' built in       Committed        xgrep command
>
> Before I give this case my +1, I have some questions:
>
> The case's specification should define the syntax of the regular expressions
> the utility accepts.  I suspect that the variants requested by the -E, -F,
> -G, and -P flags can be handled with references to the corresponding man
> pages.  But what is the specification for -X mode REs (including the
> semantics of alternation and conjunction)?

-X is like POSIX grep -E (egrep) but adds & as AND operator and ! as
NOT operator.

>
> What is the difference between lenient and strict pattern interpretation?

Strict will print syntax errors if the pattern does not match the
standard exactly. I leave the exact explanation to Glenn Fowler.

> What is the default for the -H, -h option pair?  The traditional grep
> utility only prefixes matches with file names when there's more than one
> source file.  Is there a way to request compatibility with that behavior?
>  (I think there should be.)

This is already the default.

Try:
builtin xgrep
xgrep ksh /etc/profile /etc/profile

> If conflicting options are given on the command line, which one wins?  The
> first, the last, is it an error?

Should be an error unless POSIX defines it else for this option.

Olga
-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     olga.kryzhanovska at gmail.com   \-`\-'----.
 `'-..-| /     Solaris/BSD//C/C++ programmer   \ |-..-'`
      /\/\                                     /\/\
      `--`                                      `--`

Reply via email to