cut off last lines of a document

From: Ede Wolf <listac_at_nebelschwaden.de>
Date: Fri, 01 Sep 2023 08:43:46 UTC
Hello,

 From a file/output with an unknown amount of lines, I would like to 
filter out, or not display, the last 3 lines. Is there a way to archive 
this?

For those also using linux, there is a "head -n -3" for this. That 
negative number option is not available on FreeBSD, but maybe there is 
an alterative way of doing this? Preferably /bin/sh compatible.

Thanks

Ede