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

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

tagcpy(USP)

Name

tagcpy : Copy the specified tag field to a new tag field.

Synopsis

Usage   : tagcpy <tag1>=<tagA> <tag2>=<tagB>... <file>

Option  : --pad=<pad>

Version : Tue Jan  9 09:02:34 JST 2024

Edition : 1

Description

Copies <tagA> field to <tag1> field, <tagB> field to <tag2> field,

and so on.  If equal sign and the sorce tag name are ommitted, same

name with the destination tag name is specified.  If the sorce tag

name does not exist, it is treated as a string and the destination

field is filled that string.  If the destination tag name is "0",

it is treated as all fields of in put file.

If <file> is omitted or specified as "-", the command reads from

stdin.

$ cat data

tag1 tag2 tag3

XXXX YYYY ZZZZ

Example 1

$ tagcpy tagA=tag2 tagB=tag3 tagC=tag1 data

tagA tagB tagC

YYYY ZZZZ XXXX

Example 2

The souce tags can be duplicated.

$ tagcpy tagA=tag2 tagB=tag2 tagC=tag1 data

tagA tagB tagC

YYYY YYYY XXXX

Example 3

The case of the sorce tag name is omitted.

$ tagcpy tag1 tagB=tag2 data

tag1 tagB

XXXX YYYY

Example 4

If the sorce tag name does not exist, it is treated as a string.

$ tagcpy tagA=0000 tagB=tag3 data

tagA tagB

0000 ZZZZ

Example 5

The sorce tag name is null string, the field content is "_".

$ tagcpy tagA= tagB=tag3 data

tagA tagB

_ ZZZZ

The default string can be changed with --pad option.

$ tagcpy --pad=@@ tagA= tagB=tag3 data

tagA tagB

@@ ZZZZ

Example 6

If the destination tag name is "0", it is treated as all souce tag

names.

$ tagcpy 0 tag4=____ tag5=0000 data

tag1 tag2 tag3 tag4 tag5

XXXX YYYY ZZZZ ____ 0000