[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to match regex in bash? (any character)

From: Chet Ramey
Subject: Re: How to match regex in bash? (any character)
Date: Thu, 29 Sep 2011 12:06:08 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20110902 Thunderbird/6.0.2

On 9/29/11 11:59 AM, Peng Yu wrote:
> On Thu, Sep 29, 2011 at 10:38 AM, Chet Ramey <address@hidden> wrote:
>> On 9/29/11 9:48 AM, Peng Yu wrote:
>>> Therefore, either bash manpage should specify clearly which regex
>>> manpage it should be in each system (which a bad choice, because there
>>> can be a large number of systems), or the bash manpage should omit all
>>> the non consistent reference and say something like "see more details
>>> in info" or something else that is platform independent. Referring to
>>> regex(3) without any quantification is not a very good choice .
>> Why, exactly?  regex(3) is the one thing that's portable across systems,
>> it happens to describe the interfaces bash uses, and it contains the
>> appropriate system-specific references.  `info' is considerably less
>> portable and widespread than `man', so a man page reference is the best
>> choice.
> We all have discovered that regex(3) is not consistent across all the
> platform. Why you say it is portable?

That is not what we discovered.  We discovered that the name and section of
the man page describing regular expression formats differs across systems.
We also discovered that every system we checked (at least every system I
checked) has a regex(3) man page, and that in most cases that page
(regex(3)) eventually contains the appropriate system-specific reference
to the page that describes the regular expression format.  That is why it
is the most portable alternative.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]