Hi,
I'm trying to do the following:
get the last line of a file: tail -n 1 test.csv
if this last line is END then continue(point 3), else quit
get the amount of lines in the file: wc -l test.csv
put these lines in a new file without the last line: head -n (length -1) test.csv > testdone.csv
(or if it's possible delete ONLY this line from the file)
Can someone please give me a full script on how to do this?
Thank you super much, been searching / trying for hours now!