(Video materials in preparation)
half : Convert to half-width (hankaku) character
Usage : half <f1> <f2> .. <file>
half -d string
Option : -e
-u<defstr>
Version : Thu Aug 9 23:41:42 JST 2018
Edition : 1
Converts all full-width (zenkaku) katakana and alphanumeric
characters in <file> or standard input to half-width (hankaku)
characters. (<-> full)
Converts the specified field in the specified file to half-width
characters.
(Original Data)
$ cat data
これは データ です。
This is data
1234 567 890
$ half 1 2 3 data
これは データ です。
This is data
1234 567 890
If you do not specify fields, then the entire record is converted
to half-width characters.
Full-width spaces are converted to half-width spaces.
$ cat data2
これはデータです。
全角 空白 データも変換します。
123456789
$ half data2
これはデータです。
全角 空白 データも変換します。
123456789
The "-d" option allows you to specify the text string directly. It
will be converted from full-width characters to half-width characters.
$ half -d カタカナABC123
カタカナABC123
The "-e" option cause error when unconverted full-width characters
are left in output data.
$ half data2
Error(1108)[half] : unconverted full-width char at line 1: これはデータです。
The "-u<defstr>" option converts unconverted full-width characters
to <defstr>.
$ half -u_ data2
___データ__。
__ __ データ______。
123456789