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

 

 

魂内検索

DOCUMENTS

COMMAND

FORUM

UEC DOCS

VIDEO

 

Alphabetical list

(Video materials in preparation)

charsplit

Name

charsplit : Cuts a field into two fields of fixed length

Synopsis

Usage   : charsplit [-b] [-c] <field>.<length> <file>

Version : Thu Jul 24 22:50:17 JST 2014

Description

Splits the specified <field> into two fields of length <length>.

The length is display width (half width character = 1). If a

multi-byte character will be split in the middle of a chracter

then the field is split at the bigining of that character.

If you specify a length so that the field cannot be split, then

one field is output as "_".

The -b option uses byte length instead of display width.

The -c option uses number of characters instead of display width.

Example 1

$ echo 1234 | charsplit 1.2

12 34

$ echo USP研究所 | charsplit 1.3

U SP研究所

$ echo USP研究所 | charsplit 1.1

_ USP研究所

$ echo 1234 | charsplit 1.5

1234 _

Example 2

$ echo USP研究所 | charsplit -b 1.4

U SP研究所

Example 3

$ echo USP研究所 | charsplit -c 1.4

USP研 究所