summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfernape <fernape@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-29 18:37:20 +0000
committerfernape <fernape@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>2020-10-29 18:37:20 +0000
commit507dedb17989ceac5eaa3a0502ed8ee0695dd8c9 (patch)
tree7c573be722b421ce9ea0f07ed35589c7204bf950
parent5a20a00ae78ffa7e5627641c470069757a911145 (diff)
downloadfreebsd-507dedb17989ceac5eaa3a0502ed8ee0695dd8c9.tar.gz
freebsd-507dedb17989ceac5eaa3a0502ed8ee0695dd8c9.tar.bz2
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 git-svn-id: http://svn.freebsd.org/base/head@367142 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
-rw-r--r--usr.bin/fmt/fmt.123
1 files changed, 16 insertions, 7 deletions
diff --git a/usr.bin/fmt/fmt.1 b/usr.bin/fmt/fmt.1
index 5996bbaa453..2a5c54b90bb 100644
--- a/usr.bin/fmt/fmt.1
+++ b/usr.bin/fmt/fmt.1
@@ -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 sensibly.
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