> There are very complex bash variables (array, subarray, etc). I'm not
> sure this code would be robust against all possible usages (for
> example, ":" seems to be missing).
Well, I don't know about your use case. With every reply, it seems to be
getting more complex.
Then, I'd suggest to just quote properly and throw an eval there, with all the
risks involved.