On Sunday, March 24, 2024, Greg Wooledge <g...@wooledge.org> wrote: > Conceptually that looks great, but how do you avoid "Argument list > too long" with larger inputs?
$ declare -A a=([x]=1 [y]=2) $ printf '%s\0' "${a[@]@k}" | xargs -0 jq --args -n '$ARGS.positional | _nwise(2) | {(.[0]): .[1]}' | jq -s add { "y": "2", "x": "1" } -- Oğuz