How to parse the result of a shell readall command?

Hello all,

I want to use the Linux command “lsb_release -a” which provides the details of a release:
pi@AxcysEmbeddedController:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie

In a generic way, what is the best method to parse the returning data?

I usually go RegEx diving for the data from a shell command. ExeWrapper is built this way.

Create an array and split the ReadAll results on the EOL:

Dim theResults(-1) As String

theResults = Split(theShell.ReadAll, EndOfLine)

Now you can step through each member of the theResults array and handle the text as needed.

Thanks everyone!

A whole lot 'o Tim’s in this thread :smiley: