bug-bash
[Top][All Lists]
Advanced

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

Re: docs incorrectly mention pattern matching works like pathname expans


From: Chet Ramey
Subject: Re: docs incorrectly mention pattern matching works like pathname expansion
Date: Thu, 15 Mar 2018 11:26:30 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 3/14/18 1:43 PM, Stormy wrote:

> Bash Version: 4.2
> Patch Level: 46
> Release Status: release
> 
> Description:
>  Section of 'case' in bash's man page says:
> 
>  case word in [ [(] pattern [ | pattern ] ... ) list ;; ] ... esac
>               A  case  command  first expands word, and tries to match it 
> against each pattern in turn, using the same matching
>               rules as for pathname expansion (see Pathname Expansion below).
> 
> but that is not correct, the matching here does NOT follow pathname 
> expansion, the treatment of "/" is not the same.

The description of Pathname Expansion says, in part:

"When matching a
pathname, the slash character must always be matched explicitly."

but I can expand that to also say that it other contexts it does not need
to be.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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