[Top][All Lists]

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

Re: repost of alike 'missing a way to extract data'

From: Greg Wooledge
Subject: Re: repost of alike 'missing a way to extract data'
Date: Thu, 18 Mar 2021 10:39:29 -0400

On Thu, Mar 18, 2021 at 02:44:06PM +0100, Alex fxmbsw7 Ratchev wrote:
> isnt it obvious ..


> ${var//@(abc|cde)@(bla|blubb)/\2\1} # just like sed
> and an extension for regex there

That's a feature request.  Chet can discuss that with you.

All I can tell you is that this feature is not in any way suitable for
retrieving an element from an associative array.  If it actually existed,
which of course it doesn't.

> as for example, i can give you my garbage data
> begin='declare -A a' end='declare -p a' per2 'a[$per]=' *
> declare -A a=(["\\\\"]="" ["] \$( eval echo shitt )"]="" [$'abc
> \034[22]="bar"']="" [$'\034']="" [$'\n']="" [2]="" ["]"]="" [" a   b"]=""
> ["' [b"]="" ["\" ["]="" [$'\' [1]=\034']="" ["];eval echo shitt"]=""
> [$'foo\034 [2]="blah" ']="" [abc]="" ["abc [22]=\"bar\""]="" [blah]="" )

I cannot make ANY sense of this.  I don't know what you're doing or why.

Whatever you're doing, it's ridiculously convoluted and obscure.  There
is probably some MUCH easier way to achieve the goal.  If you would just
tell us the goal, we might be able to help you do it.

reply via email to

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