sed join lines together

后端 未结 5 1589
面向向阳花
面向向阳花 2020-11-28 09:14

what would be the sed (or other tool) command to join lines together in a file that do not end w/ the character \'0\'?

I\'ll have lines like this

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-28 10:05

    if ends with 0 store, remove newline..

    sed '/0$/!N;s/\n//'
    

提交回复
热议问题