[Gambas-user] parse out the mount-points of fstab - how?

Amnon amsoft at ...683...
Tue Oct 3 10:57:35 CEST 2006


I need some help here. I wounder how I can parse the fstab to
get all mount-points in a listbox.

Thats what I have:


PUBLIC SUB dvddrives_Click()
DIM devar AS String[]
DIM i AS Integer 
DIM procLoad AS String
 
  
   mountpoint = ""
   
   
   ' fstab search
   IF mountpoint = "" THEN
   IF Exist ("/etc/fstab") = TRUE THEN
   listbox1.clear
   SHELL "cat /etc/fstab  >" & sTemp  WAIT
   ProcLoad = file.Load (sTemp)
   KILL sTemp
   listbox1.contents=ProcLoad
   FOR i = 0 TO listbox1.count-1
   IF Instr(listbox1[i].Text , drives.text) > 0 THEN
   devar=Split(listbox1[i].text, "<some value to split must be
here, but what one?>") 
   mountpoint=devar[1]
   mountpointlist.add(mountpoint)
   END IF
   NEXT
   END IF
   END IF
   
   IF dvdsource = "" THEN
   logtext.Insert("[Debug message] No VIDEODVD found!"& "\n")
   ELSE
   logtext.Insert("[Debug message] VIDEODVD source: " &
dvdsource & "\n")
   END IF
   
END

I don't get the string-value I can use to split.
---------------------------------------------
Free POP3 Email from www.Gawab.com 
Sign up NOW and get your account @gawab.com!!




More information about the User mailing list