uspTukubaiコマンドに関する様々な資料がここにあります。

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

tagclink2x(USP)

Name

tagclink2x : Joins together tag data that exists in the tag master.

               Records that do not match are joined with dummy data.

Synopsis

Usage   : tagclink2x [+<string>] <mast_key>=<tran_key> <master> <tran>

Version : Fri May 12 13:53:17 JST 2017

Edition : 1

Description

Matches the field specified with <mast_key> in tag-formatted file <master>

with the field specified with <tran_key> in tag-formatted file <tran>,

joins the matching rows in tag format and outputs them to standard output.

Rows that do not match will be joined with the underscore character ("_")

in place of the fields in <master>. Use the +<string> option to replace

this underscore with a string of your choice.

Unlike tagketugo2x, <tran> does not need to be sorted.

Unlike tagketugo2 the key field of <master> does not need to have

unique values.

Records are joined together where the key field of <master> and <tran>

are the same.

If <master> is specified as "-" then the command reads from standard

input. If <tran> is omitted or specified as "-" then the command reads

from standard input.

If <master> or <tran> is a zero-byte file, an error occurs.

Even if <master> or <tran> is a null file (contains only a tag header),

the command processes normally.

Limitations

1. <master> must both be sorted on the key field with the exception

   of the first row (tag header).

Example 1

$ keta master

M.CODE M.NAME M.AGE M.SEX

  0003   SMITH    026  WOM

  0005   JONES    050  MAN

  0005   JONES    048  WOM

  0007   NEWTON  042 WOM

$ keta tran

T.SEQ T.CODE T.A1 T.A2 T.A3

  001   0005  82 79 16

  001   0003  30 50 71

  001   0004  58 71 20

$ tagcketugo2x M.CODE=T.CODE master tran | keta

M.CODE M.NAME M.AGE M.SEX T.SEQ T.CODE T.A1 T.A2 T.A3

  0005   JONES    050  MAN 001 0005 82 79 16

  0005   JONES    048  WOM 001 0005 82 79 16

  0003   SMITH    026  WOM 001 0003 30 50 71

     _      _     _     _ 001 0004 58 71 20

Example 2 +<string> option

$ tagcketugo2x +@@ M.CODE=T.CODE master tran | keta

M.CODE M.NAME M.AGE M.SEX T.SEQ T.CODE T.A1 T.A2 T.A3

  0005   JONES    050  MAN 001 0005 82 79 16

  0005   JONES    048  WOM 001 0005 82 79 16

  0003   SMITH    026  WOM 001 0003 30 50 71

    @@     @@    @@   @@ 001 0004 58 71 20

Example 3 Read from standard input

$ cat tran   | tagcketugo2x M.CODE=T.CODE master

$ cat tran   | tagcketugo2x M.CODE=T.CODE master -

$ cat master | tagcketugo2x M.CODE=T.CODE - tran