[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: |
Tue, 16 Nov 2021 15:42:37 -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 3:03 PM, irenezerafa wrote:
> This is how I handle "-C 8" and "-C=8".
>
> ("-C") # for -C 8
> cnt="$2"
> shift 2
> ;;
> ("-C="*) # for -C=8
> cnt="${1#*=}"
> shift
> ;;
Consider that the difference between -C=8 and -C8 is a single character and
can be handled the same way.
--
``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/
- Parsing options in the form "-C8", (continued)
- Parsing options in the form "-C8", irenezerafa, 2021/11/16
- Re: Parsing options in the form "-C8", Chet Ramey, 2021/11/16
- Parsing options in the form "-C8", irenezerafa, 2021/11/16
- Re: Parsing options in the form "-C8", Chris Elvidge, 2021/11/16
- Parsing options in the form "-C8", irenezerafa, 2021/11/16
- Re: Parsing options in the form "-C8", Chet Ramey, 2021/11/16
- Parsing options in the form "-C8", irenezerafa, 2021/11/16
- Re: Parsing options in the form "-C8", Chet Ramey, 2021/11/17
- Re: Parsing options in the form "-C8", Greg Wooledge, 2021/11/17
- Parsing options in the form "-C8", irenezerafa, 2021/11/17
- Re: Parsing options in the form "-C8",
Chet Ramey <=
- Re: Parsing options in the form "-C8", Chet Ramey, 2021/11/16
- Re: Parsing options in the form "-C8", Chris Elvidge, 2021/11/16
- Re: Parsing options in the form "-C8", Lawrence Velázquez, 2021/11/16
- Re: Parsing options in the form "-C8", Chet Ramey, 2021/11/16
Re: Parsing options in the form "-C8", Dennis Williamson, 2021/11/16