Not a silver platter, but to get you on the right track....
 Code:
Open(1,"TheScript.KIX",2)
Open(2,"TheOutPut.CSV",5)
$Line = Readline(1)
While @Error = 0
  $Array = Split($Line," ")
  $Location = Left(ASCAN($Array,"ws"),3)
  If $Location > -1
    Writeline(2,$Array[$location] + ",")
  EndIf
  $Line = Readline(1)
Loop
Close(1)
Close(2)
_________________________
Today is the tomorrow you worried about yesterday.