It seems we just need to extract the text between the table name and the first
blank line below it. this should pretty easy with either awk or sed.
As for efficiency, the db files I have access to are sufficiently
small that the script should work in practise,
especially used only for debugging. Do you have a very large DB file
or a different use case?
Our deployments typically have large amount of data in tables in ovsdb and
finding out content of one table has been hard out of such large outputs,
especially from usability perspective. One can always go to awk/sed, but for
convenience traditional unix/linux systems often provides different options
of standard commands that helps narrow down output and present it to users
in a more presentable manner. I suppose I don't need to mention about
usefulness of '-d' option of ls, or '-type' of find here. Although it is
possible to write wrappers over 'find' that does the job of '-type dir', but
having it as part of 'find' helps in standardizing output and allows users
to do 'other' stuff rather than each program or individual user do this
separately..
While one can write their own scriptlets, the other important question is
how one would distribute this script to deployable systems. One easier
approach if there is something available as part of ovs package itself.
The motivation of contributing this actually came from your existing
DATABASE option that appears to eliminate the need to have similar scripts,
but extend it with a new convenience TABLE option.
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev