Antonello Cruz writes: > James Carlson wrote: > > 'svcs -Ho CTID <fmri>' should be expected to produce stable output, so > > you ought to be able to do this to get the PIDs in a service: > Right, but that's not what's in svcs(1). > It says: > "Screen output is Uncommitted. The invocation is Committed."
That's entirely reasonable for the default output. It's not at all reasonable for the things that are clearly meant to be used within scripts. I'd consider the '-Ho' format to be Committed, unless someone on the project team had a clear rationale why it should not be, and had shipped it in S10 FCS with clear warnings about that specific form. Yes, the documentation is supposed to be complete and precise. It isn't always, though, and that's where the reader sometimes has to make judgement calls about what was intended. I see this one as being quite simple, because the invoker has fully specified what he wants, so there's no wiggle room in the output. > Just to make my position clear. I am all in favor of doing the output of > -o col[,col]... stable. I just saying the man page says it is uncommitted. > > And I also believe ctstat should have a stable output for all its fields. You don't need ctstat in this case, as pgrep does just fine. I agree that it'd be nice if 'ctstat' had some obviously parseable output format, though. -- James Carlson, Solaris Networking <james.d.carlson at sun.com> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677