From 5613928eeaa361b5913cbfffa82ea7dc852fa40d Mon Sep 17 00:00:00 2001 From: gRastello Date: Fri, 8 Feb 2019 11:44:08 +0100 Subject: [PATCH] fmt: add page --- pages/common/fmt.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pages/common/fmt.md diff --git a/pages/common/fmt.md b/pages/common/fmt.md new file mode 100644 index 000000000..0e9e1b00a --- /dev/null +++ b/pages/common/fmt.md @@ -0,0 +1,19 @@ +# fmt + +> Reformat a text file by joining its paragraphs and limiting the line width to given number of characters (75 by default). + +- Reformat a file: + +`fmt {{path/to/file}}` + +- Reformat a file producing output lines of (at most) `n` characters: + +`fmt -w {{n}} {{path/to/file}}` + +- Reformat a file without joining lines shorter than the given width together: + +`fmt -s {{path/to/file}}` + +- Reformat a file with uniform spacing (1 space between words and 2 spaces between paragraphs): + +`fmt -u {{path/to/file}}`