🖥️fmt

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the fmt command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

                                            
                                            
                ███████╗███╗   ███╗████████╗
                ██╔════╝████╗ ████║╚══██╔══╝
                █████╗  ██╔████╔██║   ██║   
                ██╔══╝  ██║╚██╔╝██║   ██║   
                ██║     ██║ ╚═╝ ██║   ██║   
                ╚═╝     ╚═╝     ╚═╝   ╚═╝   
                                            

# fmt is a simple optimal text formatter. It reformats each paragraph in the file passed to it, and writes the file contents to standard output.

fmt file1

# fmt Command
#-------------------------------------------------///
# fmt simple optimal text formatter, it reformats paragraphs in specified file and prints results to the standard output. The following is the content extracted from the file domain-list.txt:

	1.tecmint.com 2.news.tecmint.com 3.linuxsay.com 4.windowsmint.com

# To reformat the above content to a standard list, run the following command with -w switch is used to define the maximum line width:

cat domain-list.txt 
	1.tecmint.com 2.news.tecmint.com 3.linuxsay.com 4.windowsmint.com

fmt -w 1 domain-list.txt
	1.tecmint.com 
	2.news.tecmint.com 
	3.linuxsay.com 
	4.windowsmint.com

# Format text with long lines to text with fixed width
fmt -s -w80 file.txt
# Explanation: 
    # It will break lines longer than 80 characters at appropriate white spaces to make them less than 80 characters long.
    # The -s flag will collapse multiple consecutive white spaces into one, or at the end of a sentence a double space.

#==============================##==============================#
# CMD FMT						       #
#==============================##==============================#
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░