JOIN.1
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:2k
源码类别:
操作系统开发
开发平台:
C/C++
- ." @(#)join.1 6.1 (Berkeley) 4/29/85
- ."
- .TH JOIN 1 "April 29, 1985"
- .AT 3
- .SH NAME
- join - relational database operator
- .SH SYNOPSIS
- .B join
- .RB [ -afIn ]
- .RB [ -e
- .IR s ]
- .RB [ -o
- .IR list ]
- .RB [ -tfIc ]
- file1 file2
- .SH DESCRIPTION
- .B Join
- forms, on the standard output,
- a join
- of the two relations specified by the lines of
- .I file1
- and
- .IR file2 .
- If
- .I file1
- is `-', the standard input is used.
- .PP
- .I File1
- and
- .I file2
- must be sorted in increasing ASCII collating
- sequence on the fields
- on which they are to be joined,
- normally the first in each line.
- .PP
- There is one line in the output
- for each pair of lines in
- .I file1
- and
- .I file2
- that have identical join fields.
- The output line normally consists of the common field,
- then the rest of the line from
- .IR file1 ,
- then the rest of the line from
- .IR file2 .
- .PP
- Fields are normally separated by blank, tab or newline.
- In this case, multiple separators count as one, and
- leading separators are discarded.
- .PP
- These options are recognized:
- .TP
- .BI -a n
- In addition to the normal output,
- produce a line for each unpairable line in file
- .IR n ,
- where
- .I n
- is 1 or 2.
- .TP
- .BI -e " s"
- Replace empty output fields by string
- .IR s .
- .ig
- .TP
- .BI -j "n m"
- Join on the
- .IR m th
- field of file
- .IR n .
- If
- .I n
- is missing, use the
- .IR m th
- field in each file.
- ..
- .TP
- .BI -o " list"
- Each output line comprises the fields specified in
- .IR list ,
- each element of which has the form
- .IR n . m ,
- where
- .I n
- is a file number and
- .I m
- is a field number.
- .PP
- .TP
- .BI -t c
- Use character
- .I c
- as a separator (tab character).
- Every appearance of
- .I c
- in a line is significant.
- .SH "SEE ALSO"
- .BR sort (1),
- .BR comm (1),
- .BR awk (1).
- .SH BUGS
- With default field separation,
- the collating sequence is that of
- .BR "sort -b" ;
- with
- .BR -t ,
- the sequence is that of a plain sort.
- .PP
- The conventions of
- .BR join ,
- .BR sort ,
- .BR comm ,
- .BR uniq ,
- .BR look
- and
- .BR awk (1)
- are wildly incongruous.