OSDN Git Service

Complete numfmt.1
[linuxjm/coreutils.git] / draft / man1 / numfmt.1
index 05a8258..001e90d 100644 (file)
@@ -8,63 +8,66 @@ numfmt \- 数字から人が読みやすい文字列への変換と、その逆
 .SH 説明
 .\" Add any additional description here
 .PP
-Reformat NUMBER(s), or the numbers from standard input if none are specified.
+NUMBER (複数可) を変換する。何も指定されなかった場合は標準入力から
+読み込んだ数字を変換する。
 .PP
 長いオプションで必須となっている引数は短いオプションでも必須です。
 .TP
 \fB\-\-debug\fR
-print warnings about invalid input
+無効な入力についての警告を表示する
 .TP
 \fB\-d\fR, \fB\-\-delimiter\fR=\fIX\fR
-use X instead of whitespace for field delimiter
+フィールド区切りとしてホワイトスペースではなく X を使用する
 .TP
 \fB\-\-field\fR=\fIFIELDS\fR
-replace the numbers in these input fields (default=1)
-see FIELDS below
+入力フィールド N の数字を変換する (デフォルトは 1)
+下記の FIELDS の説明を参照
 .TP
 \fB\-\-format\fR=\fIFORMAT\fR
-use printf style floating\-point FORMAT;
-see FORMAT below for details
+printf 形式の浮動小数点フォーマットとして FORMAT を使う。
+詳細は下記の FORMAT の説明を参照
 .TP
 \fB\-\-from\fR=\fIUNIT\fR
-auto\-scale input numbers to UNITs; default is 'none';
-see UNIT below
+入力された数字を UNIT に自動スケーリングする。
+デフォルトは 'none' である。下記の UNIT の項を参照
 .TP
 \fB\-\-from\-unit\fR=\fIN\fR
-specify the input unit size (instead of the default 1)
+入力単位のサイズの指定 (デフォルトは 1)
 .TP
 \fB\-\-grouping\fR
-use locale\-defined grouping of digits, e.g. 1,000,000
-(which means it has no effect in the C/POSIX locale)
+ロケールで定義された桁のグルーピングを使う (例: 1,000,000)。
+(したがって C/POSIX ロケールではこのオプションは効果がない)
 .TP
 \fB\-\-header\fR[=\fIN\fR]
-print (without converting) the first N header lines;
-N defaults to 1 if not specified
+最初の N 行のヘッダーを (変換せずに) 出力する。
+N が指定されなかった場合 N は 1 になる
 .TP
 \fB\-\-invalid\fR=\fIMODE\fR
-failure mode for invalid numbers: MODE can be:
-abort (default), fail, warn, ignore
+無効な数字入力時の失敗モード; MODE に指定できるのは
+abort (デフォルト), fail, warn, ignore
 .TP
 \fB\-\-padding\fR=\fIN\fR
-pad the output to N characters; positive N will
-right\-align; negative N will left\-align;
-padding is ignored if the output is wider than N;
-the default is to automatically pad if a whitespace
-is found
+パディングをして出力を N 文字幅にする。
+正の N は右寄せ、負の N は左寄せ。
+出力の幅が N より大きい場合パディングは無視される。
+デフォルトの動作では、ホワイトスペースがあった場合に
+自動的にパディングが行われる
 .TP
 \fB\-\-round\fR=\fIMETHOD\fR
-use METHOD for rounding when scaling; METHOD can be:
-up, down, from\-zero (default), towards\-zero, nearest
+スケーリング時の丸め方法として METHOD を使用する
+METHOD に指定できるのは up, down,
+from\-zero (デフォルト), towards\-zero, nearest
 .TP
 \fB\-\-suffix\fR=\fISUFFIX\fR
-add SUFFIX to output numbers, and accept optional
-SUFFIX in input numbers
+出力する数字に SUFFIX を追加する。
+また、入力する数字で接尾辞 SUFFIX を受け付ける
 .TP
 \fB\-\-to\fR=\fIUNIT\fR
-auto\-scale output numbers to UNITs; see UNIT below
+出力する数字を UNIT に自動スケーリングする。
+下記の UNIT の項を参照
 .TP
 \fB\-\-to\-unit\fR=\fIN\fR
-the output unit size (instead of the default 1)
+出力単位のサイズの指定 (デフォルトは 1)
 .TP
 \fB\-z\fR, \fB\-\-zero\-terminated\fR
 行の区切りを改行でなく NUL にする
@@ -74,13 +77,13 @@ the output unit size (instead of the default 1)
 .TP
 \fB\-\-version\fR
 バージョン情報を表示して終了する
-.SS "UNIT options:"
+.SS "UNIT オプション:"
 .TP
 none
-no auto\-scaling is done; suffixes will trigger an error
+自動スケーリングを行わない。接尾辞があるとエラーが発生する。
 .TP
 auto
-accept optional single/two letter suffix:
+1〜2文字の接尾辞を付けることができる
 .IP
 1K = 1000,
 1Ki = 1024,
@@ -88,59 +91,62 @@ accept optional single/two letter suffix:
 1Mi = 1048576,
 .TP
 si
-accept optional single letter suffix:
+1文字の接尾辞を付けることができる
 .IP
 1K = 1000,
 1M = 1000000,
 \&...
 .TP
 iec
-accept optional single letter suffix:
+1文字の接尾辞を付けることができる
 .IP
 1K = 1024,
 1M = 1048576,
 \&...
 .TP
 iec\-i
-accept optional two\-letter suffix:
+2文字の接尾辞を付けることができる
 .IP
 1Ki = 1024,
 1Mi = 1048576,
 \&...
-.SS "FIELDS supports cut(1) style field ranges:"
+.PP
+FIELDS では cut(1) と同様の形式のフィールドの範囲指定が使用できます。
 .TP
 N
-N'th field, counted from 1
+N 番目のフィールド。 1 から始まる
 .TP
 N\-
-from N'th field, to end of line
+N 番目のフィールドから行末まで
 .TP
 N\-M
-from N'th to M'th field (inclusive)
+N 番目から M 番目 (これも含まれる) のフィールド
 .TP
 \fB\-M\fR
-from first to M'th field (inclusive)
+行頭から M 番目のフィールド (これも含まれる)
 .TP
 \-
-all fields
+すべてのフィールド
 .PP
-Multiple fields/ranges can be separated with commas
+コンマで区切って複数のフィールドや範囲を指定できます。
 .PP
-FORMAT must be suitable for printing one floating\-point argument '%f'.
-Optional quote (%'f) will enable \fB\-\-grouping\fR (if supported by current locale).
-Optional width value (%10f) will pad output. Optional zero (%010f) width
-will zero pad the number. Optional negative values (%\-10f) will left align.
-Optional precision (%.1f) will override the input determined precision.
+FORMAT は浮動小数点引数 '%f' を出力できるものでなければいけません。
+クォートを付けると (%'f) (現在のロケールでサポートされていれば) \fB\-\-grouping\fR
+が有効になります。幅を示す数字を指定すると (%10f) パディングが付与されます。
+0 を幅の指定に付けると (%010f) 数字は指定の幅まで 0 が付与されます。
+負の幅を指定すると (%\-10f) 出力が左寄せされます。
+精度を指定すると (%.1f) 入力から決定される精度を上書きされます。
 .PP
-Exit status is 0 if all input numbers were successfully converted.
-By default, numfmt will stop at the first conversion error with exit status 2.
-With \fB\-\-invalid=\fR'fail' a warning is printed for each conversion error
-and the exit status is 2.  With \fB\-\-invalid=\fR'warn' each conversion error is
-diagnosed, but the exit status is 0.  With \fB\-\-invalid=\fR'ignore' conversion
-errors are not diagnosed and the exit status is 0.
-.SS "Examples:"
-.IP
-$ numfmt \fB\-\-to\fR=\fIsi\fR 1000
+入力されたすべての数字が正常に変換された場合、終了ステータスは 0 です。
+デフォルトでは、 numfmt は変換エラーが最初に起こった時点で終了ステータス 2 で
+終了します。 \fB\-\-invalid=\fR'fail' が指定された場合、変換エラーそれぞれについて
+警告が表示され、終了ステータスは 2 になります。 \fB\-\-invalid=\fR'warn' の場合、
+変換エラーそれぞれについてメッセージが表示されますが、終了ステータスは
+0 になります。 \fB\-\-invalid=\fR'ignore' の場合、変換エラーは表示されず、終了
+ステータスは 0 になります。
+.SH 例
+.IP
+\f(CW$ numfmt --to=si 1000\fR
 .IP
 \-> "1.0K"
 .IP