Richard L. Hamilton
2017-02-01 05:14:36 UTC
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).
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).