On a windows box (no CYGWIN etc) using sed how can you "delete all but the last n lines" from a text file ?
On *nix you could get tail/cat/wc involved to pre-process the input file but how can you do this using pure sed ?
[FWIW the sed is the GNU sed; the platform is Windows 2003].