Sebastien Roy wrote:
>...
>
I agree with the overview and background but...
> Proposal
> ========
>
> We propose that parseable output employ a simple field separator scheme
> similar to what is already used by "zoneadm list -p":
>
> $ zoneadm list -p
> 0:global:running:/::native:shared
>...
>
> # dladm show-link -p -o link,over,state
> e1000g0||up
> e1000g1||unknown
> e1000g2||unknown
> e1000g3||unknown
>
IMHO, the output of both commands here is unusable.
But given this case is not about zoneadm, lets leave that alone...
Please explain why using a whitespace character such as tab as the
delimiter is unworkable.
My definition of parsable input means I can write a script like
this in sh:
dladm -o state,over | while read a b; do
echo "a=$a,b=$b"
done
The output suggested by this case does not work nearly as easily as
this and what's more the stated target of this change is shell use.
It would seem to me that "dladm show-link -o link,over" is far easier
to parse, with a shell, than with the additional -p.
<rant>
Can we please have some convergance on what is considered "parsable
output" by the commands we provide in OpenSolaris and not something
different for each. If that means derailing this case so that
someone can write an opinion that decides what is and is not parsable,
then that is what I'd like to request.
</rant>
I'll point out here that there are various plain text formats, using
either commas or tabs to separate fields with databases and spreadsheets,
that how to deal with awkward data is not considered to be a problem.
Darren