-
Notifications
You must be signed in to change notification settings - Fork 1
/
split.1
83 lines (54 loc) · 2.6 KB
/
split.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
SPLIT(1) Human68k ITA TOOLBOX User's Manual SPLIT(1)
名称
split - ファイルを分割する
形式
split [ -clnvZ ] [ -count[ckl] ] [ -- ] [ file [ base ] ]
解説
split は file の内容を count ずつに分割してファイルに書き出
します.
file が 1つも指定されていない場合,または file が‘-’である
場合には標準入力から読み取りを行います.
file の最初のデータは,base に拡張子‘.000’を付加した名前の
ファイルに書き出されます.その後は拡張子を 3桁の 10進数とし
てインクリメントした名前のファイルに書き出されます.分割数は
‘.000’から‘.999’までの 1000個が限度となります.base のデ
フォルトは‘x’です.
count は分割量を指定する 10進整数です.count の直後には,
count の単位を示す次の文字を付加することができます.
c 文字(バイト)単位
k 1K(=1024)バイト単位
l 行単位
これらの文字が付加されていなければ,count は行単位となります.
count が指定されない場合のデフォルトは 1000(行)です.
split に指定できるオプションを以下に示します.
-c 書き出し先のファイルが既に存在している場合,通常は上書き
されますが,このオプションを指定するとエラーとして処理を
中止します.
-l バイト単位で分割する場合に,可能な限り行を分断しません.
分割データ内に改行があれば,最後の改行までを出力して,
残りのデータを次の出力ファイルに繰り越します.
-n バイト単位で分割する場合に,可能な限りシフトJISの 2バイ
ト文字を分断しません.分割データ内に完全な文字が 1文字
以上あり, 分割データの最後のバイトが 2バイト文字の途中
である場合には,その直前の文字までを出力し,その文字以
降を次の出力ファイルに繰り越します.
-v 書き出し先ファイル名を逐次標準出力に出力します.
-Z いかなる入力からも,^Z (control-Z) コードを EOF と見な
して入力を打ち切ります.通常は,入力が cooked モードの
キャラクタ・デバイス(CON など)である場合にのみ,^D か
または ^Z を読み取ると,それを EOF コードと見なして入力
を打ち切ります.
診断
何らかのエラーがあったときにはエラー・メッセージが標準エラー
出力に出力されます.
終了ステータスとしては,引数の記述に間違いがあった場合には 1,
ファイルがオープンできなかったり入力に失敗した場合には 2,出
力エラーやメモリ不足など,システムの問題により正常に実行でき
なかった場合には 3,すべてが正常に終了したならば 0 が返りま
す.^C などによって中断したときの終了ステータスは OS の仕様
によります.
バージョン
1.1
制作・著作
Copyright(C)1993-94 by 板垣 史彦 (Itagaki Fumihiko)
1.1 Last change: 19 Sep 1994 Itagaki Fumihiko