From nobody Fri Sep 01 08:43:46 2023 X-Original-To: questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RcWlz011sz4sFyb for ; Fri, 1 Sep 2023 08:43:59 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Received: from mail.worldserver.net (mail.worldserver.net [217.13.200.36]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "*.worldserver.net", Issuer "EuropeanSSL Server CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RcWlw2QM5z3Q1w for ; Fri, 1 Sep 2023 08:43:55 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nebelschwaden.de header.s=1687803001 header.b="F7/NxHqs"; spf=pass (mx1.freebsd.org: domain of listac@nebelschwaden.de designates 217.13.200.36 as permitted sender) smtp.mailfrom=listac@nebelschwaden.de; dmarc=none Received: from postpony.nebelschwaden.de (v22018114346177759.hotsrv.de [194.55.14.20]) (Authenticated sender: sendmail@nebelschwaden.de) by mail.worldserver.net (Postfix) with ESMTPSA id 5147A1E0B18 for ; Fri, 1 Sep 2023 10:43:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nebelschwaden.de; s=1687803001; t=1693557828; bh=RB5+VZNoUO9N1+g/L1EW2oBLj18pKdtInIoOwYOlX84=; h=Date:To:Reply-To:From:Subject:From; b=F7/NxHqsMwD+ChPywqXbPMNuDbRbEjZR4lfnLB8iupodPrStx9f2u3hYi+UmEjENI nIeiun5V5ifIu1LyN3X0m8g2P04/6bBUgdjIvJojuuoTbjga15si53cQP2f9Oa4SoV e6+pBjHwUJhbw1nE1cJKK+EZkumTkWL65zaNrENAww+o+mHERa0b29tMLhLinlYrEr du2pjKLVU5BrQHkJk0o0RJq+P8zbZJz4ItBaSG4xhJq8xoYLWaWL7X7FoajnsQI5m9 z08X9SlR8SFm8VLYqQ7ZMcPaoZLC/jEUdEjCSPD5zv3VQ8A46xG/TcJ2KBVnlLEfTY eZ5xblcv5VWUQ== Received: from [172.16.37.5] (kaperfahrt.nebelschwaden.de [172.16.37.5]) by postpony.nebelschwaden.de (Postfix) with ESMTP id 4ED4E112454 for ; Fri, 1 Sep 2023 10:43:46 +0200 (CEST) Message-ID: <57be5495-97f8-4f22-9ae2-cd9712596e64@nebelschwaden.de> Date: Fri, 1 Sep 2023 10:43:46 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: User Questions Reply-To: listac@nebelschwaden.de Content-Language: en-US From: Ede Wolf Subject: cut off last lines of a document Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.59 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_ALLOW(-0.20)[+ip4:217.13.200.0/24]; R_DKIM_ALLOW(-0.20)[nebelschwaden.de:s=1687803001]; RCVD_IN_DNSWL_LOW(-0.10)[217.13.200.36:from]; MIME_GOOD(-0.10)[text/plain]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; HAS_REPLYTO(0.00)[listac@nebelschwaden.de]; DMARC_NA(0.00)[nebelschwaden.de]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15657, ipnet:217.13.192.0/20, country:DE]; TO_DN_ALL(0.00)[]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; DKIM_TRACE(0.00)[nebelschwaden.de:+]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4RcWlw2QM5z3Q1w 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