I can remove the last 10 lines like this:ex -sc '-9,d|x' f.txtHowever, I would like to invert the selection, or remove all lines except thelast 10. Is this possible?
Invert range selection
ex mode;ex command;range
Here is a workaround:ex -sc '1,-10d|x' f.txt1,-10 select all but last 10 linesd deletex save and close