Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Sep 2023 10:43:46 +0200
From:      Ede Wolf <listac@nebelschwaden.de>
To:        User Questions <questions@freebsd.org>
Subject:   cut off last lines of a document
Message-ID:  <57be5495-97f8-4f22-9ae2-cd9712596e64@nebelschwaden.de>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?57be5495-97f8-4f22-9ae2-cd9712596e64>