Cool, thanks! It makes the solution much more readable. czw., 29 sie 2019, 12:47 użytkownik Roman Perepelitsa < roman.perepelitsa@gmail.com> napisał: > On Thu, Aug 29, 2019 at 2:51 AM Sebastian Gniazdowski > wrote: > > > > myarr=( "${(@)${myarr[@]/(#m)*/$(( msfunc(${(q)MATCH}) > ))$REPLY}/(#s)0/}" ) > > I usually use ${foo+} to expand foo for its side effects and to ignore > the substituted value. > > myarr=( "${(@)${myarr[@]/(#m)*/${$((msfunc(${(q)MATCH})))+}$REPLY}}" ) > > This way you can discard the substituted value without knowing what it is. > > Roman. >