help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Things like ${parameter^} only works with path expansion


From: Chet Ramey
Subject: Re: [Help-bash] Things like ${parameter^} only works with path expansion?
Date: Sat, 11 Apr 2015 13:16:52 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 4/11/15 12:56 PM, Peng Yu wrote:

> I just notice that the manual says "Each  character in the expanded
> value of parameter is tested against pattern, and, if it matches the
> pattern, its case is converted." But the following example shows that
> ',' only allow the match of the first character. Is there anything
> wrong with the manual or I don't understand it correctly?

Again, you didn't read far enough:

The ^^ and ,, expansions convert each matched character
in the expanded value; the ^ and , expansions match and  convert
only  the  first character in the expanded value.

-- 
``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]