Quoth Nicolas Williams on Wed, Jun 04, 2008 at 12:52:43PM -0500:
> My simple proposal would be used as I described:
> 
> svcprop -m ... | while readprop
> do
>       ...
> done
> 
> where readprop is a shell function like the one I included.
> 
> Now, that would be trivial to implement.  So trivial and so useful that
> I could do it late next week.

Trivial, perhaps, but it looked pretty complicated and difficult to
maintain to me.  Maybe I'm just not in the shell loop.  I'm asking about
your usage.  I expect that for properties with multiple values, the most
common usage will be iterating over the values.  But your code seemed to
create some sort of data structure with the type and all of the values.
So I'm asking whether your usage is representative or not, and if not,
whether you could use a solution which addresses the most common usage.

> The down-side is that you need a function like what I showed.  It's not
> a terrible downside, but svcprop could have output modes that are useful
> without any additional shell functions.  I described some possible such
> output modes in my follow-up to Mike.  But these output modes will
> require a lot more work.

Those output modes seem designed for dumping all of the property groups
of a service or instance.  Somehow, I don't think that would be common.


David

Reply via email to