From owner-svn-src-all@freebsd.org Sat Jun 20 11:24:30 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1C60F34EAFE; Sat, 20 Jun 2020 11:24:30 +0000 (UTC) (envelope-from fernape@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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49ptcF6zqjz3cbd; Sat, 20 Jun 2020 11:24:29 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EAF9EB572; Sat, 20 Jun 2020 11:24:29 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 05KBOTeH096946; Sat, 20 Jun 2020 11:24:29 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 05KBOTx3096945; Sat, 20 Jun 2020 11:24:29 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202006201124.05KBOTx3096945@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Sat, 20 Jun 2020 11:24:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r362435 - head/usr.bin/seq X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/seq X-SVN-Commit-Revision: 362435 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jun 2020 11:24:30 -0000 Author: fernape (ports committer) Date: Sat Jun 20 11:24:29 2020 New Revision: 362435 URL: https://svnweb.freebsd.org/changeset/base/362435 Log: seq(1): complete EXAMPLES section * Add a small description before the EXAMPLES that are already in the man page to explicitely state what we are trying to show instead of having the user guess what the example is doing. * Add two more examples to show usage of -s, -t and -f * mandoc -Tlint reports irrelevant use of .Tn so remove them since according to mdoc(7) it is there only for compatibility and should not be used in new manuals. Approved by: 0mp@ Modified: head/usr.bin/seq/seq.1 Modified: head/usr.bin/seq/seq.1 ============================================================================== --- head/usr.bin/seq/seq.1 Sat Jun 20 11:20:16 2020 (r362434) +++ head/usr.bin/seq/seq.1 Sat Jun 20 11:24:29 2020 (r362435) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 30, 2018 +.Dd June 20, 2020 .Dt SEQ 1 .Os .Sh NAME @@ -133,22 +133,51 @@ the default conversion is changed to .Sh EXIT STATUS .Ex -std .Sh EXAMPLES +Generate a sequence from 1 to 3 (included) with a default increment of 1: .Bd -literal -offset indent # seq 1 3 1 2 3 - +.Ed +.Pp +Generate a sequence from 3 to 1 (included) with a default increment of -1: +.Bd -literal -offset indent # seq 3 1 3 2 1 - +.Ed +.Pp +Generate a sequence from 0 to 0.1 (included) with an increment of 0.05 and padding +with leading zeroes. +.Bd -literal -offset indent # seq -w 0 .05 .1 0.00 0.05 0.10 .Ed +.Pp +Generate a sequence from 1 to 3 (included) with a default increment of 1, +a custom separator string and a custom terminator: +.Bd -literal -offset indent +# seq -s "-->" -t "[end of list]\\n" 1 3 +1-->2-->3-->[end of list] +.Ed +.Pp +Generate a sequence from 1 to 2 (included) with an increment of 0.2 and +print the results with two digits after the decimal point (using a +.Xr printf 3 +style format): +.Bd -literal -offset indent +# seq -f %.2f 1 0.2 2 +1.00 +1.20 +1.40 +1.60 +1.80 +2.00 +.Ed .Sh SEE ALSO .Xr jot 1 , .Xr printf 1 , @@ -165,12 +194,8 @@ command appeared in and was ported to .Fx 9.0 . This command was based on the command of the same name in -.Tn "Plan 9 from Bell Labs" -and the -.Tn GNU -core utilities. -The -.Tn GNU +Plan 9 from Bell Labs and the GNU core utilities. +The GNU .Nm command first appeared in the 1.13 shell utilities release. .Sh BUGS