Using sed to remove a block of text

前端 未结 3 1864
臣服心动
臣服心动 2021-02-05 02:09

I have a block of text that looks like this:

    
... a bunch of stuff 
    

I\'d like to remov

3条回答
  •  礼貌的吻别
    2021-02-05 02:31

    To remove all the text starting from and including and ending at and including , use following sed command:

    sed -i '//,//d' file_name;
    

    Reference: Delete text or paragraph between two sections using sed

提交回复
热议问题