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

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

maker(USP)

Name

maker : Converts columnar data into rows.

Synopsis

Usage   : maker [-<n>] [-d<str>] <file>

          maker [-<n>] [-d<str>] num=<n> <file>

Version : Thu May 25 13:12:38 JST 2017

Edition : 1

Description

Reorgaizes data by combining separate records from multiple rows using as a

key the first field up until the field specified as "num=<n>".

Example 1 Basic Usage

(Original Data:data)

$ cat data

0000000 Smith______ 50 F 91

0000000 Smith______ 50 F 59

0000000 Smith______ 50 F 20

0000000 Smith______ 50 F 76

0000001 Jones______ 50 F 46

0000001 Jones______ 50 F 39

0000001 Jones______ 50 F 8

0000001 Jones______ 50 F 5

0000003 Wilson_____ 26 F 30

0000003 Wilson_____ 26 F 50

0000003 Wilson_____ 26 F 71

0000003 Wilson_____ 26 F 36

0000004 Drake______ 40 M 58

0000004 Drake______ 40 M 71

0000004 Drake______ 40 M 20

0000004 Drake______ 40 M 10

$ maker num=4 data

0000000 Smith______ 50 F 91 59 20 76

0000001 Jones______ 50 F 46 39 8 5

0000003 Wilson_____ 26 F 30 50 71 36

0000004 Drake______ 40 M 58 71 20 10

Example 2

The -<n> option combines <n> records at a time.

$ maker -2 num=4 data

0000000 Smith______ 50 F 91 59

0000000 Smith______ 50 F 20 76

0000001 Jones______ 50 F 46 39

0000001 Jones______ 50 F 8 5

0000003 Wilson_____ 26 F 30 50

0000003 Wilson_____ 26 F 71 36

0000004 Drake______ 40 M 58 71

0000004 Drake______ 40 M 20 10

Example 3

If you don't specify num=<n> then everything is combined

into a single line.

$ cat data3

1

2

3

4

$ maker data3

1 2 3 4

Example 4

The -d<str> option specifies the field separator.

$ maker -d@ num=4 data

0000000 Smith______ 50 F 91@59@20@76

0000001 Jones______ 50 F 46@39@8@5

0000003 Wilson_____ 26 F 30@50@71@36

0000004 Drake______ 40 M 58@71@20@10

$ maker -d'\n' num=4 data

0000000 Smith______ 50 F 91\n59\n20\n76

0000001 Jones______ 50 F 46\n39\n8\n5

0000003 Wilson_____ 26 F 30\n50\n71\n36

0000004 Drake______ 40 M 58\n71\n20\n10