Rewrite last line in text file
From: Magnus Oskarsson (magnus.oskarsson_at_enera.se)
Date: 10/16/03
- Next message: Martin James: "Re: Compiler String handling code."
- Previous message: DPi: "Re: Rewrite last line in text file"
- Next in thread: DPi: "Re: Rewrite last line in text file"
- Reply: DPi: "Re: Rewrite last line in text file"
- Reply: David Knaack: "Re: Rewrite last line in text file"
- Reply: Perry Way: "Re: Rewrite last line in text file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 16 Oct 2003 09:10:53 +0200
I have a (potentially large) text file where I sometimes want to write a new
line (at the end), and sometimes replace the last line with a new one (the
new line is never shorter than the old one if that is of any help). Is there
an easy way to do the latter? Note: I do not want to have to rewrite the
entire file each time or to have to parse the file from the beginning, this
must be efficient.
Regards
Magnus Oskarsson
- Next message: Martin James: "Re: Compiler String handling code."
- Previous message: DPi: "Re: Rewrite last line in text file"
- Next in thread: DPi: "Re: Rewrite last line in text file"
- Reply: DPi: "Re: Rewrite last line in text file"
- Reply: David Knaack: "Re: Rewrite last line in text file"
- Reply: Perry Way: "Re: Rewrite last line in text file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|