From 6848f6db4428009f0691c6ea7da557118fc17570 Mon Sep 17 00:00:00 2001 From: Sailesh Choyal Date: Sat, 24 Sep 2016 17:27:28 +0530 Subject: [PATCH] fold: add page (#1087) --- pages/common/fold.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pages/common/fold.md diff --git a/pages/common/fold.md b/pages/common/fold.md new file mode 100644 index 0000000000..74af0493ea --- /dev/null +++ b/pages/common/fold.md @@ -0,0 +1,15 @@ +# fold + +> Wraps each line in an input file to fit a specified width and prints it to the standard output. + +- Wrap each line to default width (80 characters): + +`fold {{file}}` + +- Wrap each line to width "30": + +`fold -w30 {{file}}` + +- Wrap each line to width "5" and break the line at spaces (puts each space separated word in a new line, words with length > 5 are wrapped): + +`fold -w5 -s {{file}}`