Using sed between specific lines only

后端 未结 3 1840
野的像风
野的像风 2020-12-10 11:41

I have this sed command for removing the spaces after commas.

 sed -e \'s/,\\s\\+/,/g\' example.txt

How can i change it that, it will make

3条回答
  •  星月不相逢
    2020-12-10 12:13

    sed -e '2,3!b;s/,\s\+/,/g' example.txt
    

    This version can be useful if you later want to add more commands to process the desired lines.

提交回复
热议问题