This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Fri Jun 13, 2003 7:45 am
I got a txt file that contains this the only line i would like to have is the 3rd line or beter yet C -> 29307/ 35MB the "35mb" how do i do this ?
Disk Space Free Space
--------------------------------
C -> 29307/ 35MB
D -> 419 / 0MB
E -> 690 / 0MB
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sat Jun 14, 2003 2:42 pm
if the line number is static, 'open' and 'read' the file, 'split' the data on newlines (\n) and get the line you want the value from using 'lindex', then 'split' the line and get the last element (end) of the resulting list (lindex again).
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sat Jun 14, 2003 3:54 pm
it is always the the 3rd line i want tnx for the reply if i don't understand something ill ask again
if you don't mind hehe