From nobody Sun Sep 03 08:05: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 4Rdkq96HYCz4s33G for ; Sun, 3 Sep 2023 08:05:57 +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 4Rdkq83x4Pz3Yn8 for ; Sun, 3 Sep 2023 08:05:55 +0000 (UTC) (envelope-from listac@nebelschwaden.de) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nebelschwaden.de header.s=1687803001 header.b=i1Ls4pnh; 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 DD0A81E205C for ; Sun, 3 Sep 2023 10:05:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nebelschwaden.de; s=1687803001; t=1693728347; bh=VrPz6cis62guouvnnF+jfU3xt0GoDeCsfhW2TprHCVE=; h=Date:Reply-To:Subject:To:References:From:In-Reply-To:From; b=i1Ls4pnhlLUNrDF87pE0MPK2N9f1GwBmOthbZPADUYzSGsI44w1oPaKrGfsLZ4+VJ WISBDQftRP7/g828JV4+LB6HQqQAanXcGxQCRkCan5tZ/hb/QbzbdcfrUkkidc2iDg cjXoZcObMN8vIBt90DEZGnZEAocHCP6OdX7/UU0xJKSbL129VgpKuEniVeKI5zVZRy N/TYp1sN1oEPIMDw58+LqTLqskgCPsYKKR/pQBSfbCNOB78+RdWDNmJ6CzMqpJv/HP AUEVF+t8+k8zyfD23oxiFER2fakT9NXu37bpMePYjPh0qnf6kyKYbMfovLk+0uXF48 bXkxpGx5WBeqA== Received: from [172.16.37.5] (kaperfahrt.nebelschwaden.de [172.16.37.5]) by postpony.nebelschwaden.de (Postfix) with ESMTP id 0B9B3112585 for ; Sun, 3 Sep 2023 10:05:47 +0200 (CEST) Message-ID: Date: Sun, 3 Sep 2023 10:05: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 Reply-To: listac@nebelschwaden.de Subject: Re: cut off last lines of a document To: questions@freebsd.org References: <57be5495-97f8-4f22-9ae2-cd9712596e64@nebelschwaden.de> Content-Language: en-US From: Ede Wolf In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.56 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-0.97)[-0.966]; 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)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_NA(0.00)[nebelschwaden.de]; HAS_REPLYTO(0.00)[listac@nebelschwaden.de]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15657, ipnet:217.13.192.0/20, country:DE]; TO_DN_NONE(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: 4Rdkq83x4Pz3Yn8 Am 02.09.23 um 05:37 schrieb lain.: > On 2023年09月01日 11:37, the silly Ede Wolf claimed to have said: >> as it again is specific to FreeBSD, so if there is a >> more universal solution, that would be preferred. Even though this of course >> is a FreeBSD mailing list. > > I should point out that FreeBSD coreutils are not GNU coreutils, so > there are going to be differences. > And there are 1000s of different versions of coreutils available, > because they're so easy to re-create, and each one of them work > differently. > I am aware of this, that is why I am so thankfull for the sed and awk solutions provided here. Those are a little bit more handy than a perl script :) Of course there are differences between those tools as well, but so far those seem to have a common playground - the awk as well as sed examples so far are working for gnu as well as [Free|Net]BSD. Not even required to add the --posix flag to gnu sed.