We are doing some regression testing using selenium and part of our tests involves many interfaces tests.
Working with the standard ifconfig turns out to be quite painful because the output is not properly formatted.
Of course we could manage to pipe this into sed / awk -- but this is like an oldish approach and would force us to add more coding where simple parsing could easily be used.
So long story short: is there any tool which could allow us to parse interfaces status in a format like json or xml?
On linux one could use somethings like :
Working with the standard ifconfig turns out to be quite painful because the output is not properly formatted.
Of course we could manage to pipe this into sed / awk -- but this is like an oldish approach and would force us to add more coding where simple parsing could easily be used.
So long story short: is there any tool which could allow us to parse interfaces status in a format like json or xml?
On linux one could use somethings like :
Code:
# ip --json address show