help-bash
[Top][All Lists]
Advanced

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

Re: Parsing options in the form "-C8"


From: Chet Ramey
Subject: Re: Parsing options in the form "-C8"
Date: Wed, 17 Nov 2021 09:37:09 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.0

On 11/16/21 6:29 PM, irenezerafa wrote:

>     ("-C"*)
>       usg="${1#*C}"

You might want to use `-C' as the pattern instead of `*C', which would do
the wrong thing if the rest of the string were to contain a `C'.


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