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: Peng Yu
Subject: Re: [Help-bash] Things like ${parameter^} only works with path expansion?
Date: Sat, 11 Apr 2015 12:28:21 -0500

On Saturday, April 11, 2015, Chet Ramey <address@hidden> wrote:

> 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.


I think the manual needs to be improved. You might add something like "plus
..." or "except ..." or use some kind of list to make it easier to read.

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


-- 
Regards,
Peng


reply via email to

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