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

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

tagawk

Name

tagawk : A wrapper for awk that allows tag names to be used

Synopsis

Usage   : tagawk '<PATTERN>{<ACTION>}' <file>

Version : Mon Aug 10 23:00:51 JST 2015

Edition : 1

Description

The tagawk command allows you to use tag names (%TagName or %{TagName})

instead of field variables ($1, $2) in the awk script "<PATTERN>{<ACTION>}".

When the tagawk command detects a tag-name variable (%TagName), it

looks up the field position of the tag in <file> and converts the

tag name variable to a field variable ($1, $2, etc.) before executing

awk.

Arguments starting with "-" immediately after tagawk are considered

to be options.

You can only specify one <file>.

If <file> is not specified or specified as "-" then the command reads

from standard input.

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

If <file> is a null file (tag line only) the command executes properly.

Example 1

$ cat file

TAG1 TAG2 TAG3

1000 2000 3000

1500 2500 3500

$ tagawk 'NR==1{print $0,"TAG4"}NR>1{print $0,%TAG1+%TAG2+%TAG3}' file

TAG1 TAG2 TAG3 TAG4

1000 2000 3000 6000

1500 2500 3500 7500