The Japanese Manual team(man-jp@jp.FreeBSD.ORG) has translated and keeps maintaining them. Submitted by: Kazuo Horikawa <horikawa@isrd.hitachi.co.jp>
137 lines
4.1 KiB
Groff
137 lines
4.1 KiB
Groff
.\" Copyright (c) 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the University of
|
|
.\" California, Berkeley and its contributors.
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" @(#)lam.1 8.1 (Berkeley) 6/6/93
|
|
.\" jpman %Id: lam.1,v 1.3 1997/08/20 12:59:57 horikawa Stab %
|
|
.\"
|
|
.Dd June 6, 1993
|
|
.Dt LAM 1
|
|
.Os
|
|
.Sh 名称
|
|
.Nm lam
|
|
.Nd ファイルを並べて結合する
|
|
.Sh 書式
|
|
.Nm
|
|
.Op Fl f Ar min.max
|
|
.Op Fl s Ar sepstring
|
|
.Op Fl t Ar c
|
|
.Ar file ...
|
|
.Nm lam
|
|
.Op Fl p Ar min.max
|
|
.Op Fl s Ar sepstring
|
|
.Op Fl t Ar c
|
|
.Ar file ...
|
|
.Sh 解説
|
|
.Nm lam
|
|
は指定されたファイルを並べてコピーし、標準出力に出力します。
|
|
各入力ファイル
|
|
.Ar file
|
|
の
|
|
.Em n
|
|
行目は、出力の
|
|
.Em n
|
|
行目を構成する要素と見なされ、結合されます。
|
|
`\fB\-\fP' というファイル名は標準入力と見なされ、
|
|
繰り返し指定することもできます。
|
|
.Pp
|
|
通常、各オプションはその直後の
|
|
.Ar file
|
|
に対してのみ有効です。
|
|
オプション文字が大文字で指定されれば、
|
|
再び大文字になっていないオプションが現れるまで、
|
|
後続する全てのファイルに対して適用されます。
|
|
オプションは以下の通りです。
|
|
.Bl -tag -width indent
|
|
.It Fl f Ar min.max
|
|
行の構成要素をフォーマット文字列
|
|
.Ar min.max
|
|
に従って出力します。ここで
|
|
.Ar min
|
|
は最小フィールド幅、
|
|
.Ar max
|
|
は最大フィールド幅です。
|
|
もし
|
|
.Ar min
|
|
がゼロで始まっていれば、
|
|
フィールド幅を満たすためにゼロが付加されます。
|
|
もし
|
|
.Ar min
|
|
が `\-' で始まっていれば、その要素はフィールド内で左詰めされます。
|
|
.It Fl p Ar min.max
|
|
.Fl f
|
|
と同様ですが、
|
|
このファイルが EOF に達したにもかかわらず他のファイルがまだ残っていれば、
|
|
このファイルのフィールドをパディングします。
|
|
.It Fl s Ar sepstring
|
|
次のファイルからの行要素を表示する前に
|
|
.Ar sepstring
|
|
を表示します。
|
|
このオプションは最終ファイルの後に指定することもできます。
|
|
.It Fl t Ar c
|
|
入力ファイルの行の終端文字として、改行文字に代えて、
|
|
.Ar c
|
|
を用います。
|
|
省略された各出力行には、通常、改行文字が追加されます。
|
|
.El
|
|
.Pp
|
|
複数ファイルを並べて表示する簡便な方法については
|
|
.Xr pr 1
|
|
を参照して下さい。
|
|
.Sh 使用例
|
|
次のコマンド
|
|
.Bd -literal
|
|
lam file1 file2 file3 file4
|
|
.Ed
|
|
|
|
は4つのファイルを各々行毎に結合します。
|
|
4つの異なるファイルの行をマージするには、以下のコマンドを用います。
|
|
.Bd -literal
|
|
lam file1 \-S "\\
|
|
.br
|
|
" file2 file3 file4
|
|
.Ed
|
|
|
|
1つのファイルの行を1行おきに結合するには、以下のコマンドを用います。
|
|
.Bd -literal
|
|
lam \- \- < file
|
|
.Ed
|
|
|
|
`@' で示された部分を置換して letter を作成するには、
|
|
以下のコマンドを用います。
|
|
.\" ↑この部分、やや意味不明。原文は以下の通り。
|
|
.\" a form letter with substitutions keyed by `@' can be done with
|
|
.Bd -literal
|
|
lam \-t @ letter changes
|
|
.Ed
|
|
.Sh 関連項目
|
|
.Xr join 1 ,
|
|
.Xr pr 1 ,
|
|
.Xr printf 3
|