[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: efficient way to use matched string in variable substitution
From: |
Chet Ramey |
Subject: |
Re: efficient way to use matched string in variable substitution |
Date: |
Mon, 23 Aug 2021 15:25:12 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
On 8/23/21 3:13 PM, Oğuz wrote:
> 23 Ağustos 2021 Pazartesi tarihinde L A Walsh <bash@tlinx.org> yazdı:
>
>> Starting with a number N, is there
>> an easy way to print its digits into an array?
>> I came up with a few ways, but thought this
>> would be nice (with '\1' or '$1' being what was matched
>> in the 1st part), this could be statement:
>
>
> If memory serves, the ampersand character will have this function in bash
> 5.2.
Yes, it's tagged for bash-5.2.
--
``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/
- Re: efficient way to use matched string in variable substitution, (continued)
- Re: efficient way to use matched string in variable substitution, Léa Gris, 2021/08/24
- Re: efficient way to use matched string in variable substitution, Greg Wooledge, 2021/08/24
- Re: efficient way to use matched string in variable substitution, Mike Jonkmans, 2021/08/24
- Re: efficient way to use matched string in variable substitution, L A Walsh, 2021/08/24
- Re: efficient way to use matched string in variable substitution, Koichi Murase, 2021/08/24
Re: efficient way to use matched string in variable substitution, Oğuz, 2021/08/23
- Re: efficient way to use matched string in variable substitution,
Chet Ramey <=