Hello all! Is there a way to remove the last line in a text file? Or, alternatively, is there a way to read a text file until the penultimate line of the file?
That is, if you have a file like:
Code:
AAAA
BBBB
CCCC
DDDD
XXXXXXXX
read all lines except the last one? In the previous example I need to hold only AAAA, BBBB , CCCC and DDDD.
Thank you!