替换两行之间的内容 replace content between two line


/ Published in: Bash
Save to your folder(s)

line1=[aaaa]
content
line2=[bbbb]

let "0000" repalce the content.


Copy this code and paste it in your HTML
  1. v='oooo';sed -n '/^\[aaaa\]/{p;:a;n;H;/^\[bbbb]/!ba;x;s/.*/'"$v"'/;G;};p'

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.