-
Notifications
You must be signed in to change notification settings - Fork 1
/
rev.1
72 lines (47 loc) · 2.17 KB
/
rev.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
REV(1) Human68k ITA TOOLBOX User's Manual REV(1)
名称
rev - 行を反転する
形式
rev [ -fBCZ ] [ -- ] [ file ] ...
解説
rev は各 file を順次読み取り,各行の内容を左右に反転して標準
出力に出力します.シフトJIS 2バイト文字のコードは保存されま
す.
file が 1つも指定されていない場合,または file が‘-’である
場合には標準入力から読み取りを行います.file がオープンでき
ないときにはエラー・メッセージを標準エラー出力に出力して処理
を継続します.
rev には次のオプションがあります.
-f 最も長い行に合わせてテキストを右に詰めます.行の幅は 1
バイトを 1桁と数えます.一般的なシフトJISテキストにはこ
れで対応できますが,2バイト半角文字などの特殊な文字には
対応しません.また,水平タブや制御文字などによる桁移動
は考慮されません.水平タブを含むテキストに対して -fオプ
ションを使用する場合には expand(1) を併用してください.
-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 コードと見なして入力
を打ち切ります.
関連事項
expand(1), fold(1), revr(1), tr(1)
診断
何らかのエラーがあったときにはエラー・メッセージが標準エラー
出力に出力されます.
終了ステータスとしては,引数の記述に間違いがあった場合には 1,
ファイルがオープンできなかったり入力に失敗した場合には 2,出
力エラーやメモリ不足など,システムの問題により正常に実行でき
なかった場合には 3,すべてが正常に終了したならば 0 が返りま
す.^C などによって中断したときの終了ステータスは OS の仕様
によります.
バージョン
1.0
制作・著作
Copyright(C)1994 by 板垣 史彦 (Itagaki Fumihiko)
1.0 Last change: 20 Apr 1994 Itagaki Fumihiko