我有这个代码,如何改进它
diff -b -i -w out.txt out2.txt
| grep '^>'
| sed 's/^>//g'
| sed ':a;N;$!ba;s/\n/ /g'
示例数据(out.txt)
abc def ghk
abc def2 ghk
abc def ghk
123 333 555
566 3423 23
566 3423 3542
示例数据(out2.txt)
abc def2 ghk
abc def ghk
abc def ghk
123 555 555
fsdjhfsda sd
566 3423 3542
预期结果 :
abc def ghk 123 555 555 fsdjhfsda sd