Following on from the tutorial in the magazine, our data would look much better in a table: Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda3 3470204 3089264 201816 94% / /dev/hda4 1510060 1064572 368780 75% /opt /dev/hda1 4593600 3732708 860892 82% /WINDOWS Right, take a deep breath. Here we go with the complete code for loading a table with the contents of a file: Sub loadTableFromFile(file as string, header, optional delimeter as string) 'Define all of the variables that we'll need Dim filenumber As Integer Dim lineNumber As Integer Dim lineCount As Integer Dim iLine As String Dim doc as object Dim table as object Dim cursor as object Dim cellname as object Dim cell as object dim iwidth as integer dim i as integer 'Get line count lineCount = 0 filenumber = Freefile Open file For Input As filenumber While not eof(filenumber) Line Input #filenumber, iLine If iLine <> "" then 'count the number of fields in the file Dim cArray if isMissing(delimeter) then cArray = split(iLine) else cArray = split(iLine,delimeter) end if iwidth=ubound(cArray)+ 1 lineCount = lineCount + 1 end if wend Close #filenumber doc = thiscomponent cursor=doc.text.createtextcursor() cursor.gotoEnd(False) 'Create the table table=doc.createinstance("com.sun.star.text.TextTable") table.initialize(lineCount+1,iwidth) doc.Text.insertTextContent(cursor,table,False) 'Add a header line for i = 0 to ubound(header) cell = table.getcellbyname(chr(i+65) & 1) cell.string=header(i) next i 'Populate the table with the contents of the file filenumber = Freefile lineNumber = 2 Open file For Input As filenumber While not eof(filenumber) Line Input #filenumber, iLine If iLine <> "" then Dim iArray if isMissing(delimeter) then iArray = split(iLine) else iArray = split(iLine,delimeter) end if for i = 0 to ubound(iArray) cell = table.getcellbyname(chr(i+65) & lineNumber) cell.string=iArray(i) next i lineNumber = lineNumber + 1 end if wend Close #filenumber End Sub sub btnReport_Click const tmpfile as string = "/tmp/myfile.tmp" dim command as string dim header header = array( "Filesystem", _ "1K-blocks", _ "Used","Available","Use%","Mounted on") command = "df|grep -v Filesystem > " & tmpfile & ";" _ & "while [ ""$(grep ' ' " & tmpfile & ")"" != """" ];" _ & "do cat " & tmpfile & " | sed s/' '/' '/g > " & tmpfile & "; done" loadNewFile load_report(lstReport.getselectedItemPos()) runCommand(command) loadTableFromFile(tmpfile,header) end sub If you've seen any form of Basic before, there should be nothing new to you here; and even if you haven't, the code should still be fairly understandable. This is one of the most useful aspects of Basic - it has a structure very similar to normal speech. All you have to do is make the most of the functionality that's built into the language. If you look through the code you'll find some useful examples - chr (which returns an ASCII code for a given integer: chr(65) returns the letter A), array (which creates an array from a series of strings) and ubound (which returns the maximum index number for an array). Your homework is to look at the btnReport_Click subroutine above. Examine the way that the command variable is built up and sent to the Linux shell.