From nobody Sat Sep 02 05:09:03 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 4Rd2xv1xw1z4rkqs for ; Sat, 2 Sep 2023 05:09:23 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) (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 "mx1.riseup.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Rd2xt2J80z4SK8 for ; Sat, 2 Sep 2023 05:09:22 +0000 (UTC) (envelope-from ralf-mardorf@riseup.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=riseup.net header.s=squak header.b=BpcZrmFK; spf=pass (mx1.freebsd.org: domain of ralf-mardorf@riseup.net designates 198.252.153.129 as permitted sender) smtp.mailfrom=ralf-mardorf@riseup.net; dmarc=pass (policy=none) header.from=riseup.net Received: from fews01-sea.riseup.net (fews01-sea-pn.riseup.net [10.0.1.109]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx1.riseup.net (Postfix) with ESMTPS id 4Rd2xr0470zDqXB for ; Sat, 2 Sep 2023 05:09:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1693631360; bh=0T6Ka9IXAXMwhowVFVzVyyjI5onBCZn/FZXZofcQIcQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=BpcZrmFK+FQXTnCH60l1xB0S95quLXO7T9rGkqTsrmndFBxzAOBVumhTIwQ5+xoVB bNGWlk+wu2B5xMBS0YjTjV+lczH9OnfhmvnYJicoBrj2OUlSsicaijBBZJoU1oPPJO gSlZtiCb07F8XB03R8R6y6zAjqjOz9mdBzEzMmZk= X-Riseup-User-ID: 8D64A02490C131F7EF21656A16675C8EEA0A364065965583EC58E20989196B9C Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews01-sea.riseup.net (Postfix) with ESMTPSA id 4Rd2xq2Q33zJn8q for ; Sat, 2 Sep 2023 05:09:19 +0000 (UTC) Message-ID: <4062326d85f9e9988b08ab49df4a59e3148fea76.camel@riseup.net> Subject: Re: cut off last lines of a document From: Ralf Mardorf To: questions@freebsd.org Date: Sat, 02 Sep 2023 07:09:03 +0200 In-Reply-To: References: <57be5495-97f8-4f22-9ae2-cd9712596e64@nebelschwaden.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.99 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-0.998]; NEURAL_HAM_SHORT(-0.79)[-0.792]; DMARC_POLICY_ALLOW(-0.50)[riseup.net,none]; R_DKIM_ALLOW(-0.20)[riseup.net:s=squak]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[198.252.153.129:from]; RWL_MAILSPIKE_GOOD(-0.10)[198.252.153.129:from]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[questions@freebsd.org]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:16652, ipnet:198.252.153.0/24, country:US]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[riseup.net:+]; RCPT_COUNT_ONE(0.00)[1]; DWL_DNSWL_NONE(0.00)[riseup.net:dkim]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[] X-Rspamd-Queue-Id: 4Rd2xt2J80z4SK8 Hi, to write a super portable script the best way would be to check what operating system is used and to check the version of the used shell. case in FreeBSD) command=3Dfoo;; *) command=3Dbar;; esac When using busybox there are a few extra pitfalls. Regards, Ralf