On Mon, Aug 23, 2021 at 12:41:58PM -0700, L A Walsh wrote:
>
>
> On 2021/08/23 12:10, Greg Wooledge wrote:
> > On Mon, Aug 23, 2021 at 11:36:52AM -0700, L A Walsh wrote:
> > > Starting with a number N, is there
> > > an easy way to print its digits into an array?
> >
> > "Easy"? Or "efficient"?
On 2021/08/23 12:10, Greg Wooledge wrote:
On Mon, Aug 23, 2021 at 11:36:52AM -0700, L A Walsh wrote:
Starting with a number N, is there
an easy way to print its digits into an array?
"Easy"? Or "efficient"? Your subject header says one, but your body
says the other.
Efficient,
On 8/23/21 3:13 PM, Oğuz wrote:
> 23 Ağustos 2021 Pazartesi tarihinde L A Walsh 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
23 Ağustos 2021 Pazartesi tarihinde L A Walsh 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 memo
On Mon, Aug 23, 2021 at 11:36:52AM -0700, L A Walsh wrote:
> Starting with a number N, is there
> an easy way to print its digits into an array?
"Easy"? Or "efficient"? Your subject header says one, but your body
says the other.
> arr=(${N//[0-9]/\1 })
> arr=(${N//[0-9]/$1 })
Obviously those
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:
arr=(${N//[0-9]/\1 })
or
arr=(${N//[0-9]/$1 })
Instead of using loops
On 8/22/21 5:11 PM, Emanuele Torre wrote:
> It would be nice to have a parameter transformation (e.g. "${par@p}")
> that expands $par to a string that will not be expanded by PS1, PS2, &c.
So you want it to be expanded at some point, but its value not subject to
any of the prompt string expansions