Replace a word with multiple lines using sed?

前端 未结 9 1690
礼貌的吻别
礼貌的吻别 2020-11-27 06:32

I\'m working on a bash-script that has to prepare an E-Mail for being sent to a user.

It aggregates some data, which ends up being multiple lines of stuff. For the e

9条回答
  •  感动是毒
    2020-11-27 07:00

    You can put your data in a temp file and run:

    $ sed '/_data_/r DATA_FILE' mail.tpl | sed '/_data_/d'> temp; mv temp mail.tpl
    

提交回复
热议问题