From nobody Thu Sep 14 15:00:31 2023 X-Original-To: dev-commits-src-all@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 4RmgVR2Tmnz4sZxF; Thu, 14 Sep 2023 15:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RmgVR1yZRz4VwM; Thu, 14 Sep 2023 15:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694703631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16bYmNIfmsyYJ0lEgsR9szTb9ryMYRuxQWpYgPxuHdg=; b=ctr1+Rgh8vv0uP4a2Mfz877LEIeR66S3jk4q75gvhjOb5WSsSFTWo4uHJLBBgU+Pj+wkeR TOgQzpFmlfZrATwOibygI47g5eCQobVTx0r2PcmVDfZastEnNp6noijj7SBqolJrj1iGrI dgbWCfdx5RxRda32OXXvSvtE2lyoJkHRfGrjfpKCUrHwjDVxcUDo4DuYTsceyBVpJDOyNu JvuMCIFXYnU8tZ7i/nd9JRgFsi//9od+5OcXctlQzgbe16TXMED1xHm3+npRrkWzZkdIof 09qsAESmJ05w9zckwYAJeFS5i+EcPMZuYdaB74QLg0iUY4s5DF6Cu/M1Rd7z1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694703631; a=rsa-sha256; cv=none; b=wVKuP+GLBFvQzOaMaMDihvLkKdWSDPSaUWdHKeqQpIr+5+7AThGc3m00QAu5SnSvRrPtOo B+Qr2Ps7rxR+1nvhSdkUTxnljpnIIA9lTBGRupGSU0vOLjwQHs8s1ZhehkBV+A3nBTDnc+ Aaz0TAAfhF7A4kkJdVfgxnFSw5hY2OTPGeCYhxVL/hGm4s5kBIAIALTlBKrFBvqIeaGP8q r3bg7Fbzl5VhIs2vw/bAMdscTQDCqg+65dAyMQWBjwOud6FoEoDRXIvhcVbEo9M9NXkNCb rt4Icx/C1sAF2OICbxm6apw/GSPRM+caTW7j18jJ55puP2OgPrX+cPV3QCuH+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694703631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16bYmNIfmsyYJ0lEgsR9szTb9ryMYRuxQWpYgPxuHdg=; b=j1ZE31iG6xEbgfYm2QVnkjfrltMVvAzVX0JVz+wIRb6CDMYXJeI/H/lHudt5FZd/4Ir74A ykvjUbbush1zE3iXodzOUIgRd3U54aR9+vtC69qAGNpvMWNvshFYs1NEaWORKaqZSB0KUl X9y0MOZd24s/OAwNNVbv3HVaXLrEarJI0IdTLf/MlaLwnP+x90qUt7bg6chfRGfoNUroVB zuAVaEO0dx8dq+Yw6gwiDll7xxYHEbFlDcsIKNMnPnqws5QfWsqN9FWwIP+olPrIrTqhBa Net+huVc7G1qVLICAbbMgrajx8W+er9EEmZo9KR03ZeIK/5XODHM6lotOLR0DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RmgVR13WNz11wX; Thu, 14 Sep 2023 15:00:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 38EF0VTX089438; Thu, 14 Sep 2023 15:00:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 38EF0Vkc089435; Thu, 14 Sep 2023 15:00:31 GMT (envelope-from git) Date: Thu, 14 Sep 2023 15:00:31 GMT Message-Id: <202309141500.38EF0Vkc089435@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a721afaf8543 - stable/13 - split: Update synopsis and usage; fix examples List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a721afaf85437708ae45a5b3baaa6915f0f1aba0 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a721afaf85437708ae45a5b3baaa6915f0f1aba0 commit a721afaf85437708ae45a5b3baaa6915f0f1aba0 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-04-14 11:50:13 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-14 14:59:52 +0000 split: Update synopsis and usage; fix examples - Mark -d as an optional flag - Add a prompt to one of the examples for consistency - Add -d to the usage message Sponsored by: Klara Inc. (cherry picked from commit fb499259997c0bfd724b7b67578035cd977ef60f) --- usr.bin/split/split.1 | 12 ++++++------ usr.bin/split/split.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/usr.bin/split/split.1 b/usr.bin/split/split.1 index 55f9e4f65234..6dba7489a83d 100644 --- a/usr.bin/split/split.1 +++ b/usr.bin/split/split.1 @@ -27,7 +27,7 @@ .\" .\" @(#)split.1 8.3 (Berkeley) 4/16/94 .\" -.Dd October 25, 2022 +.Dd April 18, 2023 .Dt SPLIT 1 .Os .Sh NAME @@ -35,12 +35,12 @@ .Nd split a file into pieces .Sh SYNOPSIS .Nm -.Fl d +.Op Fl d .Op Fl l Ar line_count .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix .Nm -.Fl d +.Op Fl d .Fl b Ar byte_count Ns .Oo .Sm off @@ -50,12 +50,12 @@ .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix .Nm -.Fl d +.Op Fl d .Fl n Ar chunk_count .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix .Nm -.Fl d +.Op Fl d .Fl p Ar pattern .Op Fl a Ar suffix_length .Op Ar file Op Ar prefix @@ -185,7 +185,7 @@ $ echo -e "This is 22 bytes long" | split -d -b10 .Pp Split input generating 6 files: .Bd -literal -offset indent -echo -e "This is 22 bytes long" | split -n 6 +$ echo -e "This is 22 bytes long" | split -n 6 .Ed .Pp Split input creating a new file every time a line matches the regular expression diff --git a/usr.bin/split/split.c b/usr.bin/split/split.c index 96cad28cb1e5..29ee0581d071 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -393,9 +393,9 @@ static void usage(void) { (void)fprintf(stderr, -"usage: split [-l line_count] [-a suffix_length] [file [prefix]]\n" -" split -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]]\n" -" split -n chunk_count [-a suffix_length] [file [prefix]]\n" -" split -p pattern [-a suffix_length] [file [prefix]]\n"); +"usage: split [-d] [-l line_count] [-a suffix_length] [file [prefix]]\n" +" split [-d] -b byte_count[K|k|M|m|G|g] [-a suffix_length] [file [prefix]]\n" +" split [-d] -n chunk_count [-a suffix_length] [file [prefix]]\n" +" split [-d] -p pattern [-a suffix_length] [file [prefix]]\n"); exit(EX_USAGE); }