Roland Mainz wrote: > "Jordan Brown (Sun)" wrote: >> Roland Mainz wrote: >>> Ok... two questions: >>> 1. How can a Bourne[1] shell script get the number of values in a >>> property ? >>> 2. How can I get value number <n> from a Bourne[1] shell script ?
Unfortunately, I don't know of an easy way. Sounds like a good RFE for svcprop (which is supposed to be tailored for use by shells). > ... one question is still open: How do I know when a property is > _supposed_ to have only exactly one value or when it _may_ have multiple > values by design ? The XML file can define this via "astring_list" to > indicate that multiple values may follow... but I don't see a way to > seperate between both cases on the consumer side via /usr/bin/svcprop > ... ;-( We currently have no way to express the expected cardinality of a specific property. This is one of the things which the extended templates project is attempting to address. They are about to submit their design materials to ARC, so I recommend taking a look at what they have and see if it solves your problem: http://www.opensolaris.org/jive/thread.jspa?messageID=217882 Dave