Peter Memishian writes:
>  >     Hmm, this is dladm, so my parser needs to have IFS='|', whilea
>  >     later in my script the one that uses zoneadm needs IFS=: and
>  >     this other place needs eval (but has namespace issues) - except
>  >     on Fridays when the user has a locale != "C" ...
>  > 
>  > You are right - expecting a common set of code is probably not
>  > worthwhile, but having a common grammar/format (IMO) still is.
> 
> I think it's worthwhile too, but this case is considerably more modest in
> its goals: we simply want dladm to be easy to parse in the shell and other
> simple-minded traditional Unix utilities.  We believe the simple approach
> we're proposing with this case are generally applicable to future
> utilities and thus would others inventing paresable output modes that need
> to be shell-friendly to follow the same appraoch.  We also expect that
> future networking CLIs we're working on (flowadm, ipmpstat, lbadm, ...)
> will look quite similar, but that's as far as we're comfortable going
> given both the political and technical obstacles (not just in terms of
> legacy code, but in terms of differing requirements) to building a truly
> uniform solution.

For what it's worth, the colon-separated (and escaped) output method
of resolving this problem is what I did for zoneadm in PSARC 2006/387
and CR 6431731, and for exactly the same reasons.

There's at least some precedent here.

-- 
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

Reply via email to