# Par (command)

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Par_(command)
> Markdown URL: https://mediated.wiki/source/Par_(command).md
> Source: https://en.wikipedia.org/wiki/Par_(command)
> Source revision: 1300342320
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Unix text formatting program}}
{{Lowercase}}
{{confused|GNU parallel}}<!-- or the non-GNU "par" utility similar to "parallel", which doesn't have a Wikipedia page -->
{{Infobox software
| name                   = par
| logo                   = 
| screenshot             = 
| screenshot size        = 
| caption                = 
| author                 = Adam M. Costello
| developer              = 
| released               = 
| latest release version = 
| latest release date    = 
| operating system       = [Unix](/source/Unix) and [Unix-like](/source/Unix-like)
| genre                  = [Command](/source/Command_(computing))
| license                = 
| website                = 
}}
The computer program '''par''' is a [text formatting](/source/text_formatting) utility for [Unix](/source/Unix) and [Unix-like](/source/Unix-like) [operating system](/source/operating_system)s, written by Adam M. Costello as a replacement for the [fmt](/source/fmt_(Unix)) command.

Par reformats paragraphs of text to fit into a given line length optimally, keeping prefixes and suffixes intact, which is useful for formatting source code comments. It also understands the conventions commonly used for quoting in email replies, and is capable of intelligently reformatting these several levels deep while rewrapping the text they quote.

Par can be invoked from text editors such as [Vim](/source/Vim_(text_editor)) or [Emacs](/source/Emacs). To support [Unicode](/source/Unicode) par needs to be compiled with a [patch](/source/Patch_(Unix)) that adds [multi-byte character](/source/multi-byte_character) support, typically, [UTF-8](/source/UTF-8) encoding. Unlike fmt, par also supports text justification.

==References==
# Costello, Adam M. (2001). "[http://www.nicemice.net/par/par-doc.var par.doc]". Accessed August 4, 2005.

==External links==
{{Wikibooks|Guide to Unix|Commands}}
* {{Official website|http://www.nicemice.net/par/}}
* [https://web.archive.org/web/20211124085854/http://sysmic.org/dotclear/index.php?post/2006/06/22/55-add-multibyte-characters-support-in-par Add multi-byte character support to par (Patch author's website)]. Archived November 24, 2021.
* [http://vimcasts.org/episodes/formatting-text-with-par Vimcasts.org: formatting text with par ]
* [http://vim.wikia.com/wiki/Par_text_reformatter Vim wikia: Par text reformatter]
* [https://git.sr.ht/~mcepl/par/ Current development repository with all mentioned patches applied]

<!-- Cygwin package list (par/par-1.42-1) (see
[http://www.cygwin.com/packages/ http://www.cygwin.com/packages/ Cygwin Package List]
[http://cygwin.com/cgi-bin2/package-grep.cgi?grep=paragraph+reformatter Search Results] -->

{{Unix commands}}

{{DEFAULTSORT:Par (Command)}}
Category:Unix text processing utilities

{{unix-stub}}

---
Adapted from the Wikipedia article [Par (command)](https://en.wikipedia.org/wiki/Par_(command)) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Par_(command)?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
