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

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

YCHANGE(USP)

Name

ychange : Creates a record showing changes from the previous record

Synopsis

Usage   : ychange num=<n> <file>

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

Edition : 1

Description

Creates "change records" in the form "before" "after" based on the

contents of the history file <file> using the top <n> fields as the

key.

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

reads from standard input.

Example 1

$ cat data

0001 tounaka1 5/1 1

0001 tounaka2 5/2 4

0001 tounaka3 5/3 4

0001 tounaka4 5/4 4

0001 tounaka4 5/5 7

0002 mitsumura 5/1 1

0003 toppo1 5/1 1

0003 toppo2 5/2 4

0003 toppo3 5/3 4

0003 toppo4 5/4 4

0003 toppo4 5/5 7

$ ychange num=1 data

0001 tounaka1 5/1 1 tounaka2 5/2 4

0001 tounaka2 5/2 4 tounaka3 5/3 4

0001 tounaka3 5/3 4 tounaka4 5/4 4

0001 tounaka4 5/4 4 tounaka4 5/5 7

0002 mitsumura 5/1 1

0003 toppo1 5/1 1 toppo2 5/2 4

0003 toppo2 5/2 4 toppo3 5/3 4

0003 toppo3 5/3 4 toppo4 5/4 4

0003 toppo4 5/4 4 toppo4 5/5 7

Note

1. ychange is not looking at the record's contents.  If two

   consecutive rows contain the same key, it considers them as

   "before" and "after" and concatinates them together.

2. Rows that have no changes, in other words, single rows, are

   output as-is.  If you only want to output rows that have changes,

   or only want to output rows without changes, you can separate

   them based on the number of fields in the row.