source: trunk/minix/man/man1/join.1@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.0 KB
RevLine 
[9]1.\" @(#)join.1 6.1 (Berkeley) 4/29/85
2.\"
3.TH JOIN 1 "April 29, 1985"
4.AT 3
5.SH NAME
6join \- relational database operator
7.SH SYNOPSIS
8.B join
9.RB [ \-a\fIn ]
10.RB [ \-e
11.IR s ]
12.RB [ \-o
13.IR list ]
14.RB [ \-t\fIc ]
15file1 file2
16.SH DESCRIPTION
17.B Join
18forms, on the standard output,
19a join
20of the two relations specified by the lines of
21.I file1
22and
23.IR file2 .
24If
25.I file1
26is `\-', the standard input is used.
27.PP
28.I File1
29and
30.I file2
31must be sorted in increasing ASCII collating
32sequence on the fields
33on which they are to be joined,
34normally the first in each line.
35.PP
36There is one line in the output
37for each pair of lines in
38.I file1
39and
40.I file2
41that have identical join fields.
42The output line normally consists of the common field,
43then the rest of the line from
44.IR file1 ,
45then the rest of the line from
46.IR file2 .
47.PP
48Fields are normally separated by blank, tab or newline.
49In this case, multiple separators count as one, and
50leading separators are discarded.
51.PP
52These options are recognized:
53.TP
54.BI \-a n
55In addition to the normal output,
56produce a line for each unpairable line in file
57.IR n ,
58where
59.I n
60is 1 or 2.
61.TP
62.BI \-e " s"
63Replace empty output fields by string
64.IR s .
65.ig
66.TP
67.BI \-j "n m"
68Join on the
69.IR m th
70field of file
71.IR n .
72If
73.I n
74is missing, use the
75.IR m th
76field in each file.
77..
78.TP
79.BI \-o " list"
80Each output line comprises the fields specified in
81.IR list ,
82each element of which has the form
83.IR n . m ,
84where
85.I n
86is a file number and
87.I m
88is a field number.
89.PP
90.TP
91.BI \-t c
92Use character
93.I c
94as a separator (tab character).
95Every appearance of
96.I c
97in a line is significant.
98.SH "SEE ALSO"
99.BR sort (1),
100.BR comm (1),
101.BR awk (9).
102.SH BUGS
103With default field separation,
104the collating sequence is that of
105.BR "sort \-b" ;
106with
107.BR \-t ,
108the sequence is that of a plain sort.
109.PP
110The conventions of
111.BR join ,
112.BR sort ,
113.BR comm ,
114.BR uniq ,
115.BR look
116and
117.BR awk (9)
118are wildly incongruous.
119.\" ref. to awk(9) man page corrected -- ASW 2005-01-15
Note: See TracBrowser for help on using the repository browser.