How can I remove a line-feed/newline BEFORE a pattern using sed

前端 未结 5 1989
悲哀的现实
悲哀的现实 2021-01-02 17:34

The title already states it:

I want to use some linux one liner (e.g. sed)

to transform

Anytext
{

into

Anyt         


        
5条回答
  •  一向
    一向 (楼主)
    2021-01-02 18:22

    If the intention is to remove the newline from a \n{ sequence bbe seems to be the simplest tool to use:

    bbe -e 's/\n{/{/' infile
    

提交回复
热议问题