Using sed to remove a block of text

前端 未结 3 1865
臣服心动
臣服心动 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:41

    $ cat text 
    abc
        
    ... a bunch of stuff
        
    def
    $ sed '//,//d' text 
    abc
    def
    

    http://www.catonmat.net/blog/sed-one-liners-explained-part-three/

提交回复
热议问题