Dpaste - Horizontal merge of D-files

[ English | Japanese ]

[visit D-home]

SYNOPSIS

Dpaste input-file [ input-file.. ]

DESCRIPTION

Dpaste merges records horizontally. All input files are read in parallel, and the i-th record of the output has all the fields of i-th record of the first input file, followed by all the fields of i-th record of the second input file, and so on. When an input file comes to the end-of-file, it is simply dropped from the input file list, and the output process continues until all the input-files reach the end-of-file.

When there is just one input-file, the standard input is taken as the second input-file.

OPTIONS

-D [i/o]datautf=8|16|32
UTF I/O feature (see manual page of UTF I/O feature.)

ENVIRONMENT

Ddatautf, Didatautf, Dodatautf
for UTF I/O feature.

EXAMPLES

Short file

File-1 contains:

a:1

a:2

a:3

File-2 contains:

b:1

b:2

and File-3 contains:

c:1

Then, command

Dpaste File-1 File-2 File-3

outputs the following result:

a:1
b:1
c:1

a:2
b:2

a:3

Same field name

File-1 contains:

a:1

and File-2 contains

a:2

result of

Dpaste File-1 File-2

is as follows:

a:1
a:2

Note that the paste operation is carried out regardless to the field names of the records. As in the above example, if the records have a same field name, the result becomes a repeating field.

DIAGNOSTICS

See the manual of D_msg.

SEE ALSO

Dintro, Djoin, Dproj, D_msg. Djoin.

AUTHOR

MIYAZAWA Akira


miyazawa@nii.ac.jp
2003