Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fmt(1) [minix man page]

FMT(1)							      General Commands Manual							    FMT(1)

NAME
fmt - adjust line-length for paragraphs of text SYNOPSIS
fmt [-width] [files]... DESCRIPTION
fmt is a simple text formatter. It inserts or deletes newlines, as necessary, to make all lines in a paragraph be approximately the same width. It preserves indentation and word spacing. The default line width is 72 characters. You can override this with the -width flag. If you don't name any files on the command line, then fmt will read from stdin. It is typically used from within vi to adjust the line breaks in a single paragraph. To do this, move the cursor to the top of the para- graph, type "!}fmt", and hit <Return>. AUTHOR
Steve Kirkendall kirkenda@cs.pdx.edu FMT(1)

Check Out this Related Man Page

FMT(1)							    BSD General Commands Manual 						    FMT(1)

NAME
fmt -- simple text formatter SYNOPSIS
fmt [-Cr] [goal [maximum]] [name ...] fmt [-Cr] [-g goal] [-m maximum] [name ...] DESCRIPTION
fmt is a simple text formatter which reads the concatenation of input files (or standard input if none are given) and produces on standard output a version of its input with lines as close to the goal length as possible without exceeding the maximum. The goal length defaults to 65 and the maximum to 75. The spacing at the beginning of the input lines is preserved in the output, as are blank lines and interword spac- ing. In non raw mode, lines that look like mail headers or begin with a period are not formatted. -C instructs fmt to center the text. -g goal New way to set the goal length. -m maximum New way to set the maximum length. -r Raw mode; formats all lines and does not make exceptions for lines that start with a period or look like mail headers. fmt is meant to format mail messages prior to sending, but may also be useful for other simple tasks. For instance, within visual mode of the ex(1) editor (e.g., vi(1)) the command !}fmt will reformat a paragraph, evening the lines. SEE ALSO
mail(1), nroff(1) HISTORY
The fmt command appeared in 3BSD. BUGS
The program was designed to be simple and fast - for more complex operations, the standard text processors are likely to be more appropriate. BSD
May 29, 2007 BSD
Man Page

8 More Discussions You Might Find Interesting

1. Solaris

fmthard showing error with prtvtoc

Hi all, I am trying to use the disk for mirror where in the mirror disk is of 160 gb and the rootdisk is of 80 gb. when i am trying to write the vtoc i am getting below error i tried the below command #prtvtoc /dev/rdsk/c0t0d0s0 |fmthard -s -/dev/rdsk/c0t2d0s0 and got below ... (26 Replies)
Discussion started by: kumarmani
26 Replies

2. UNIX for Advanced & Expert Users

fmt command

Hello, I have file which needs to be splitted into multiple line with each line holding 80 bytes. Im using the fmt command as fmt -w 80 {filename} > {out filename} but getting the error fmt: Too many characters in a word. Thanks Use code tags, ty. (7 Replies)
Discussion started by: atlantis
7 Replies

3. Solaris

fmthard error

Hello, I have a X86 server (solaris 10) with 4 similar disks. One of these 4 disks is the root disk. I need to create a mirror disk to the root disk and two hot spares using the remaining 3 disks. However, when I use the fmthard commad, I am getting the below error: root@xxxxxxxx>prtvtoc... (5 Replies)
Discussion started by: mystition
5 Replies

4. Shell Programming and Scripting

Delete last characters in each column

I need to delete the last 11 characters from each number and they are all in the same line (each is in a different column): -6.89080901827020800000 3.49348891708562325136 1.47988367839905286876 -2.29707635413510400000 -3.49342364708562325136 -4.43758473239905286876 -2.29707635413510400000... (14 Replies)
Discussion started by: rogeriog.em
14 Replies

5. Shell Programming and Scripting

Formatting paragraphs with fmt with rule

Hi, i know that i can format a whole file using fmt -w 78 file > file_new Now, i would like to implement a rule in the following way: - If a paragraph starts with % (and ends with %), the paragraph should remain unchanged. - Otherwise the command stated above should be applied to the... (4 Replies)
Discussion started by: johnlocke85
4 Replies

6. Red Hat

FATAL: Error running install command for binfmt_0000

Hi, Firstly, I want to say hello to all of you guys. My first post here... I have issue with CentOS and I hope that there is someone who can help or even explain what could cause this kind of situation. I have installed CentOS 5.7 x86_64 into Hyper-V (Windows Server 2012 R2) environment. After... (0 Replies)
Discussion started by: gigolos
0 Replies

7. Shell Programming and Scripting

Plz help me out use OFMT operator in awk programming

Hi While calculating the sum of 6 and 7 fileds it is calculate the wrong value because of floating point like 7898778.10 awk ' BEGIN { FS = OFS = "|" } NR == 1 { next } { UX = $1 OFS $3 OFS $4 OFS $5 p1 +=$6 p2 +=$7 } END { for(i in UX) ... (8 Replies)
Discussion started by: jagu
8 Replies

8. Shell Programming and Scripting

Format your scripts with shfmt

I've been working on a tool to format (style) shell programs, much like gofmt for Go. After much testing and personal use, I'm throwing it out there to see if it's useful to anyone else. GitHub - mvdan/sh: A shell parser and formatter in Go You'll need golang to build and install it. If this... (11 Replies)
Discussion started by: mvdan
11 Replies