From owner-svn-src-head@freebsd.org Thu Oct 29 18:37:21 2020 Return-Path: Delivered-To: svn-src-head@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 27F4B45A88B; Thu, 29 Oct 2020 18:37:21 +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 4CMZ1F0KVFz489B; Thu, 29 Oct 2020 18:37:21 +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 E3349A036; Thu, 29 Oct 2020 18:37:20 +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 09TIbKBk040708; Thu, 29 Oct 2020 18:37:20 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09TIbKap040707; Thu, 29 Oct 2020 18:37:20 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <202010291837.09TIbKap040707@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: Thu, 29 Oct 2020 18:37:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367142 - head/usr.bin/fmt X-SVN-Group: head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: head/usr.bin/fmt X-SVN-Commit-Revision: 367142 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2020 18:37:21 -0000 Author: fernape (ports committer) Date: Thu Oct 29 18:37:20 2020 New Revision: 367142 URL: https://svnweb.freebsd.org/changeset/base/367142 Log: fmt(1): Add EXAMPLES section Very small EXAMPLES section. While here, remove reference to nroff(1). Approved by: manpages (bcr@) Differential Revision: https://reviews.freebsd.org/D26947 Modified: head/usr.bin/fmt/fmt.1 Modified: head/usr.bin/fmt/fmt.1 ============================================================================== --- head/usr.bin/fmt/fmt.1 Thu Oct 29 18:34:47 2020 (r367141) +++ head/usr.bin/fmt/fmt.1 Thu Oct 29 18:37:20 2020 (r367142) @@ -30,7 +30,7 @@ .\" .\" Modified by Gareth McCaughan to describe the new version of `fmt' .\" rather than the old one. -.Dd December 1, 2017 +.Dd October 29, 2020 .Dt FMT 1 .Os .Sh NAME @@ -89,10 +89,6 @@ Try to format mail header lines contained in the input Format lines beginning with a .Ql \&. (dot) character. -Normally, -.Nm -does not fill these lines, for compatibility with -.Xr nroff 1 . .It Fl p Allow indented paragraphs. Without the @@ -159,10 +155,23 @@ environment variables affect the execution of .Nm as described in .Xr environ 7 . +.Sh EXAMPLES +Center the text in standard input: +.Bd -literal -offset indent +$ echo -e 'The merit of all things\enlies\enin their difficulty' | fmt -c + The merit of all things + lies + in their difficulty +.Ed +.Pp +Format the text in standard input collapsing spaces: +.Bd -literal -offset indent +$ echo -e 'Multiple spaces will be collapsed' | fmt -s +Multiple spaces will be collapsed +.Ed .Sh SEE ALSO .Xr fold 1 , -.Xr mail 1 , -.Xr nroff 1 +.Xr mail 1 .Sh HISTORY The .Nm