ヒアドキュメントをパイプでsedに噛ますだけ。

1
2
3
4
5
6
7
8
cat <<'EOS' | sed 's/%AI/DAMAI/g'
%AI:Yes sister, GOOD SISTER!
///
NANAGY:... Why am i here?
%AI:Because we are sister!
EOS

```実行結果

DAMAI:Yes sister, GOOD SISTER! /// NANAGY:… Why am i here? DAMAI:Because we are sister! ```