Try this: ksh -c 'typeset -T vm_t=(integer size) ; compound container=(vm_t -A foo=([f]=(size=1))) ; print -v container' ( vm_t -A foo=( [f]=( typeset -l -i size=1 ) ) )
Does that answer your question? Container can be read back into a var with read -C Ced On 1 February 2017 at 06:14, Richard L. Hamilton <rlham...@gmail.com> wrote: > Modern ksh93 allows both what amounts to structures (typeset -T) and arrays > (typeset -a or typeset -A). > > Is it possible to have an array of structures? (in particular, an > associative array) > > If so, are there any examples available? > > Say that I have a structure consisting of at a minimum: > > vmhost > vmstartcmd > vmstopcmd > > and I want a structure with those members, and an array of them that can be > looked up by vmname, given that I have VMs on multiple hosts using more than > one sort of VM software (e.g. Parallels and VirtualBox). > > _______________________________________________ > ast-users mailing list > ast-users@lists.research.att.com > http://lists.research.att.com/mailman/listinfo/ast-users -- Cedric Blancher <cedric.blanc...@gmail.com> [https://plus.google.com/u/0/+CedricBlancher/] Institute Pasteur _______________________________________________ ast-users mailing list ast-users@lists.research.att.com http://lists.research.att.com/mailman/listinfo/ast-users