[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern M
From: |
Michael Convey |
Subject: |
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching |
Date: |
Thu, 18 Jun 2015 08:24:53 -0700 |
On Thu, Jun 18, 2015 at 7:15 AM, Eduardo A. Bustamante López <
address@hidden> wrote:
> I think it'll help you to know that Chet Ramey is bash's maintainer (the
> persons that's responsible for the source of the bash interpreter). So his
> explanation of how bash works is authoritative.
>
> Now, I don't know why you bring the subject of standarization, because it
> seems
> that you do not understand it very well. That two things follow a standard
> doesn't mean that they will behave identically for all possible
> situations. It
> only means that they'll behave in a compatible manner in the cases
> contained in
> the standard. find's globs and bash globs are compatible in their basic
> form,
> but bash supports an advanced form of globs (extglob), that's why it can't
> use
> a simple library function to perform the expansion of globs.
>
> --
> Eduardo Bustamante
> https://dualbus.me/
>
Eduardo,
Actually, I didn't bring it up. Greg brought it up and I was responding to
his comment, which is as follows:
*...Every implementation of globbing is slightly different. There are
no standards.You seem to be asking "which library function does ___ use" as
if thatwould reveal the answer to the your real question "to which
globbingstandard does ____ conform", but there are no such standards in
thefirst place. Right now, you just have to learn each program's features
one by one.*
I was attempting to determine which globbing library is used by each
program to better make sense of why different programs implemented globbing
differently. For example, if find and bash both used fnmatch, then I could
try to understand how the defaults were set be each program. However, I've
learned that bash does not use fnmatch, but strmatch -- which is based on
an old version of fnmatch. It would be nice if all programs who implement
globbing migrated to a common library. The way it is now, it is
inconsistent and confusing for the learner. If Linux and related programs
(bash, find, etc.) "standardized" more on common libraries, mastering these
areas would be less time consuming.
There is so much fascinating technology to be learned, but if you are
bogged down in one because it is inconsistent and convoluted, then there is
less time to expand learning into other technologies. Everyone has to weigh
the pros/cons of investing time into learning a technology. With
Linux/Bash, etc., the steep learning curve is a significant barrier to
entry. Is that learning curve unnecessarily steep due to inconsistencies
such as this. Don't get me wrong, I really enjoy learning this technology,
but I regularly evaluate the cost vs benefit of the investment of time
required. You're right that I don't understand it well, but I aspire to
improve my understanding and that's why I'm here. =)
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, (continued)
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Michael Convey, 2015/06/17
Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Stephane Chazelas, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Michael Convey, 2015/06/17
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Eduardo A . Bustamante López, 2015/06/18
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching,
Michael Convey <=
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Chet Ramey, 2015/06/18
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Michael Convey, 2015/06/18
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Eduardo A . Bustamante López, 2015/06/18
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Greg Wooledge, 2015/06/19
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Eric Blake, 2015/06/19
- Re: [Help-bash] Filename Expansion: Find Utility vs Bash Shell Pattern Matching, Chet Ramey, 2015/06/19