-
Notifications
You must be signed in to change notification settings - Fork 1
/
colrm.1
72 lines (46 loc) · 2.1 KB
/
colrm.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
COLRM(1) Human68k ITA TOOLBOX User's Manual COLRM(1)
名称
colrm - 入力の各行から指定カラムを削除して出力する
形式
colrm [ -BCZ ] startcol [ <endcol> ]
解説
colrm は標準入力を読み取り,各行の startcol 番目から endcol
番目までの文字を削除して標準出力に出力するフィルタ・コマンド
です.endcol を省略した場合や,改行が endcol 以前にある場合
には,改行の直前までが削除されます.改行が startcol 以前にあ
る場合には何も削除されません.
startcol と endcol は行の先頭を 1 とするバイト単位の番号です.
マルチバイト文字には対応していません.マルチバイト文字を保存
する必要がある場合には cut(1) を用いてください.
colrm には次のオプションがあります.
-B 決して ^J コードの ^M^J への変換を行いません.通常は,
出力が cooked モードのキャラクタ・デバイス(CON や PRN
など)である場合には,^M に続いていない ^J コードを
^M^J に変換して出力します.
-C -B オプションと逆に,^M に続いていない ^J コードを常に
^M^J に変換して出力します.
-Z いかなる入力からも,^Z (control-Z) コードを EOF と見な
して入力を打ち切ります.通常は,入力が cooked モードの
キャラクタ・デバイス(CON など)である場合にのみ,^D か
または ^Z を読み取ると,それを EOF コードと見なして入力
を打ち切ります.
関連事項
cut(1)
診断
何らかのエラーがあったときにはエラー・メッセージが標準エラー
出力に出力されます.
終了ステータスとしては,引数の記述に間違いがあった場合には 1,
出力エラーやメモリ不足など,システムの問題により正常に実行で
きなかった場合には 3,すべてが正常に終了したならば 0 が返り
ます.^C などによって中断したときの終了ステータスは OS の仕
様によります.
不具合
cooked モードのキャラクタ・デバイスからは,^D や ^Z を EOF
としてではなくデータとして入力することはできません.
CON からは行単位で入力されますので,^D あるいは ^Z の後にも
改行が必要です.
バージョン
1.0
制作・著作
Copyright(C)1995 by 板垣 史彦 (Itagaki Fumihiko)
1.0 Last change: 24 Jan 1995 Itagaki Fumihiko