>>158
スクリプトの実行はできましたが、 %s/〜/〜/g
だと〜に/が入っていた時に困ります。
〜には何が入るかわかりません。

あとviは標準入力から読み込めませんでした
できれば標準入力から読み込みんで標準出力に出力したいです。

ちなみにviのバージョンです

# vi -H
These features are available:
Pattern searches with / and ?
Last command repeat with .
Line marking with 'x
Named buffers with "x
Some colon mode commands with :
Settable options with ":set"
Signal catching- ^C
Job suspend and resume with ^Z
Adapt to window re-sizes
BusyBox v1.28.3 () multi-call binary.

Usage: vi [OPTIONS] [FILE]...

Edit FILE

-c CMD Initial command to run ($EXINIT also available)
-R Read-only
-H List available features