在每个数据块中仅删除第4和第5个值(第一个数据块中的fourth1和fifth1,第二个数据块中的fourth2和fifth2,第三个数据块中的fourth3和fifth3 )。
已尝试此sed -E -e :a -e 's/(.*) ( .*$)/\1 \4 \5/; ta',但不起作用。
{content-start}
first1
second1
third1
fourth1
fifth1
sixth1
{content-end}
{content-start}
first2
second2
third2
fourth2
fifth2
sixth2
{content-end}
{content-start}
first3
second3
third3
fourth3
fifth3
sixth3
{content-end}https://stackoverflow.com/questions/50669186
复制相似问题