On Wed, Jun 04, 2008 at 10:38:49AM -0700, David Bustos wrote: > Quoth Nicolas Williams on Wed, Jun 04, 2008 at 12:53:34AM -0500: > > I'd rather svcprop(1) had an option to print multiple values like so: > > > > % svcprop -m -c -p config someservice > > config/bar astring d\ > > \ c > > config/bar astring e > > % > > Are you just going to iterate over the values? Or will you have to > revisit some of them? If you're just going to iterate, can we produce > strings suitable for "for val in `svcprop ...`" or > "set -- `svcprop ...`"? If you have to revisit them, how difficult > would it be to produce output which a shell can stuff into an array, as > Mike suggested?
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. 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. Nico --