genius_at_work wrote. . .
Code:
I don't use file commands, but you may try: 

thanks for the reply, i use them a lot.
like you said Fopen().pos just gives the position & not the line number. - Some of the File commands do implicitly consider line breaks like fseek -n , fseek -l & $fread() which places teh pointer at the beginning of the next line after returning.


Here's what am doing,
I need to return the previous line given a certain line.
so I fseek -w to the given line, & then i need to get the text in the previous line. there is only a fseek -n that seeks to the next line & no way to get the previous line

Last edited by Nightstorm; 15/06/09 02:56 PM.