Usage: fmt [-WIDTH] [OPTION]... [FILE]...
Reformat each paragraph in the FILE(s), writing to standard output.
The option -WIDTH is an abbreviated form of --width=DIGITS.
長いオプションに必須の引数は短いオプションにも必須です.
-c, --crown-margin preserve indentation of first two lines
-p, --prefix=STRING reformat only lines beginning with STRING,
reattaching the prefix to reformatted lines
-s, --split-only split long lines, but do not refill
-t, --tagged-paragraph indentation of first line different from second
-u, --uniform-spacing one space between words, two after sentences
-w, --width=WIDTH maximum line width (default of 75 columns)
--help この使い方を表示して終了
--version バージョン情報を表示して終了
ファイルの指定がなかったり, - であった場合, 標準入力から読み込みます.
Report fmt bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Usage: fmt [-WIDTH] [OPTION]... [FILE]...
Reformat each paragraph in the FILE(s), writing to standard output.
The option -WIDTH is an abbreviated form of --width=DIGITS.
Mandatory arguments to long options are mandatory for short options too.
-c, --crown-margin preserve indentation of first two lines
-p, --prefix=STRING reformat only lines beginning with STRING,
reattaching the prefix to reformatted lines
-s, --split-only split long lines, but do not refill
-t, --tagged-paragraph indentation of first line different from second
-u, --uniform-spacing one space between words, two after sentences
-w, --width=WIDTH maximum line width (default of 75 columns)
--help display this help and exit
--version output version information and exit
With no FILE, or when FILE is -, read standard input.
Report fmt bugs to bug-coreutils@gnu.org
GNU coreutils home page:
FMT(1) FMT(1)
名前
fmt - テキストを段落に整形する
書式
fmt [-ctsu] [-WIDTH] [-p REFIX] [-w WIDTH] [--crown-margin]
[--split-only] [--tagged-paragraph] [--uniform-spacing] [--prefix=PRE-
FIX] [--width=WIDTH] [FILE...]
fmt [--help] [--version]
説明
fmt は行を結合したり隙間を埋めたりして、出力各行を与えられた文字数に揃
える (正確には越えないようにする)。デフォルトは 75 桁。 fmt は FILE 引
数 (ファイルが一つも指定されなかった場合は標準入力) から読み、標準出力
に書く。
デフォルトでは、空行・単語間のスペースの数・インデントは出力に保存さ れ
る 。インデントの異なる連続行は結合しない。タブは入力で一度スペースに変
換され、出力で挿入される。
fmt は文の最後で改行しようとする。また文の最初の単語の直後や、文の最 後
の 単 語 の直前での改行は避けようとする。「文の区切り」は、段落の最後か
、‘.?!’ のどれかで終わる単語に 2 つのスペースまたは続いたものとして定義
さ れ る。ただし括弧や引用符の内部では文区切りとはみなされない。 TeX(1)
と同じく、 fmt も「段落」全体を読み込んでから改行位置を決める。このアル
ゴ リ ズ ム は 、 "Breaking Paragraphs into Lines" (Donald E. Knuth and
Michael F. Plass, Software--Practice and Experience’, 11 (1981)
1119-1184) で提案されたものをちょっと変更したものである。
オプション
-c, --crown-margin
クラウンマージンモード (crown margin mode)。段落の最初の二行のイ
ンデントを保存し、引き続く行の左マージンをそれぞれ第二行のものに
揃える。
-p PREFIX, --prefix=PREFIX
PREFIX で始まる行 (スペースが前置されていても良い) だけを再配置
する。 PREFIX (と前置されるスペース) は整形前にいったん削除さ れ
、整形された出力行に再び挿入される。利用法としては、例えばある種
のプログラムのコメントだけを整形して、コード部分は変更したくない
場合などが考えられる。
-s, --split-only
行分割だけを行う。短い行を結合して長い行を生成する作業を行わない
。プログラムコードなどの「整形済み」テキストが不正に結合されるの
を避けることができる。
-t, --tagged-margin
タグ付き段落モード (tagged paragraph mode)。クラウンモードと似て
いるが、段落の最初の行のインデントは第二行のものとは異なっていな
ければならない。同じである場合は、最初の行は一行だけからなる段落
とみなされる。
-u, --uniform-spacing
一様なスペース配置 (uniform spacing)。単語間のスペースをスペース
文字ひとつに減らす。ただし文の間には二つのスペース文字が用いられ
る。
-WIDTH, -w WIDTH, --width=WIDTH
出力行を WIDTH 桁まで埋めようとする (デフォルトは 75)。 fmt は各
行の長さを揃えるための空間を確保する目的から、およそ 7% ほど行を
短くする傾向にある。
--help 標準出力に使用方法のメッセージを出力して正常終了する。
--version
標準出力にバージョン情報を出力して正常終了する。
注意
プログラムのバグについては bug-textutils@gnu.org に報告してください。
man ページは Ragnar Hojland Espinosa
FMT(1) User Commands FMT(1)
NAME
fmt - simple optimal text formatter
SYNOPSIS
fmt [-WIDTH] [OPTION]... [FILE]...
DESCRIPTION
Reformat each paragraph in the FILE(s), writing to standard output.
The option -WIDTH is an abbreviated form of --width=DIGITS.
Mandatory arguments to long options are mandatory for short options
too.
-c, --crown-margin
preserve indentation of first two lines
-p, --prefix=STRING
reformat only lines beginning with STRING, reattaching the pre-
fix to reformatted lines
-s, --split-only
split long lines, but do not refill
-t, --tagged-paragraph
indentation of first line different from second
-u, --uniform-spacing
one space between words, two after sentences
-w, --width=WIDTH
maximum line width (default of 75 columns)
--help display this help and exit
--version
output version information and exit
With no FILE, or when FILE is -, read standard input.
AUTHOR
Written by Ross Paterson.
REPORTING BUGS
Report fmt bugs to bug-coreutils@gnu.org
GNU coreutils home page:
Copyright(C) linux-cmd.com All Rights Reserved. Author Takayuki Yukawa