From nobody Tue Apr 18 13:30:36 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 4Q14YS5k0Vz456b6; Tue, 18 Apr 2023 13:30:36 +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 4Q14YS5JWsz443y; Tue, 18 Apr 2023 13:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681824636; 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=1Vg7tJ5KlmWcSsKIbqLQpS+9+4O3dIEIr/haLZFst4M=; b=vVDTS6l2/xNuyfbnx/jSMVKKfOXS6w/xWBR/+HW74O041McNuRmhiw+ZjSFpUwI2POva9Y xgHUux3i04IcDDtCU3tIqmAWMtu2WbIksTonXqH4uT6tUh0mLwz3kdmSGGBa1+fE3xS6y5 AYGS2BxHyrP5Bs4nh2xVmR08EXW9f87Iu3pMfVKz1ksynpkQ5duC19DLYRgz75cKw0A4GS RsDPimFwX1niy08TPbXWgsMaC5UFUY10AOgTucH9j50JYKDm7ZctolqIAHvK0gxjE4yfvd sSmkJ5DZ+zZtatQMH1925Gf0T07NDF1pixLd+YVIgFBwBnNajAT6m1S7c1Q/+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1681824636; 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=1Vg7tJ5KlmWcSsKIbqLQpS+9+4O3dIEIr/haLZFst4M=; b=n6XBQRVt0qQxyN7nUAZXxJxy2mImUCFjE9VbOLks/TCVMfukIEhzsRx7a3oHyw7cvDHNeh 3AomfcB+Hyon/49gStyFEVJMwCxkX6BISg3MNrMmkVrckOULeglsJ3L9DgkhcsQuB4avEz dCRt/ZSpTZvqwkMatMYRgctbSfaPcTQugkYACJAbY32iddWuzO7JFAZKXWNV4Km7mRiQsz Ojfg6z70nACOhE5wr7+Ou2bNOh9tHzKUDnhaEisAmvZcwJ4vnDVNOTaMbxoTljo3B54bGV QtlhB9+mGROfjrtuatb0bO1aOODSZT0GUIJG358hVsB8CaXUOK2f4CaSGdhaKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1681824636; a=rsa-sha256; cv=none; b=An8g/aGAbAggQMhbx2cTlsDIVJOa7O7m/zaqTxzdvLd22zB89JBeqba1NvnccccZNhfWq/ aKJdvI7xnf/wFCYFQyrc/4ZtyMhdKbFAjEMiYKWJTE1kVB2OdsBaBHgOCF6HCZ2v14nsqs zBPgCFkqDFl6wJsOOmDUlfk7ya49fXGukl9aD4Q6dH+/n8PVsamje++gq9moSwbeT0mRYp hF+YfdBHqprkC/zS9LkfXEMeOuXYzZgnkxrmaj6pBogahvxLNRuMJsiVGuizOqoKheBcNI /K9ZYtrMLdRYKrfiKTqQGLXlfqzl9YUaMa6PBHt3ca4J5JN4YuBmLjD5pXuXFw== 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 4Q14YS4Kx1z1CSZ; Tue, 18 Apr 2023 13:30:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 33IDUa0P022522; Tue, 18 Apr 2023 13:30:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 33IDUawT022521; Tue, 18 Apr 2023 13:30:36 GMT (envelope-from git) Date: Tue, 18 Apr 2023 13:30:36 GMT Message-Id: <202304181330.33IDUawT022521@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: fb499259997c - main - 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: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb499259997c0bfd724b7b67578035cd977ef60f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=fb499259997c0bfd724b7b67578035cd977ef60f commit fb499259997c0bfd724b7b67578035cd977ef60f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2023-04-14 11:50:13 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2023-04-18 13:30:00 +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. --- 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 4d5f4a1a0753..14ea2eec8dad 100644 --- a/usr.bin/split/split.1 +++ b/usr.bin/split/split.1 @@ -28,7 +28,7 @@ .\" @(#)split.1 8.3 (Berkeley) 4/16/94 .\" $FreeBSD$ .\" -.Dd October 25, 2022 +.Dd April 18, 2023 .Dt SPLIT 1 .Os .Sh NAME @@ -36,12 +36,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 @@ -51,12 +51,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 @@ -186,7 +186,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 091c914ba8f7..5d6cbe138d38 100644 --- a/usr.bin/split/split.c +++ b/usr.bin/split/split.c @@ -395,9 +395,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); }