0

我想在linux中像excel格式一样格式化以下输出。

ersPea Inc.
www.sdfikpea.com/
0
5

werd inc
www.werds.com
34242
5

ersPea Inc. www.sdfikpea.com/ 0 5

werd inc www.werds.com 34242 5
4

2 回答 2

1
sed 'N;N;N;y/\n/ /;N'
  • 多读 3 行
  • 用空格替换换行符
  • 在空行中读取
于 2013-04-29T06:05:31.473 回答
0
 sed '5~5b;N;N;N;y/\n/\s/' inputfile
于 2013-04-29T06:02:31.133 回答