标题: 请问如何用awk或者sed把第二行的某个字段合并到第一行末尾? [打印本页] 作者: kamui0523 时间: 2013-08-16 16:52 标题: 请问如何用awk或者sed把第二行的某个字段合并到第一行末尾? Completed 200 OK in 13ms (Views: 6.5ms | ActiveRecord: 2.5ms)
Started GET "/users/2251663/moments" for 192.168.10.11 at 2013-08-16 15:15:17 +0800
Completed 200 OK in 2318ms (Views: 222.9ms | ActiveRecord: 1999.6ms)
Started GET "/cluster/2865765/brief" for 192.168.10.11 at 2013-08-16 15:15:23 +0800
Completed 200 OK in 5ms (Views: 1.9ms | ActiveRecord: 1.4ms)
Started GET "/photo/2865765/brief" for 192.168.10.11 at 2013-08-16 15:15:23 +0800
Completed 200 OK in 8ms (Views: 3.1ms | ActiveRecord: 1.6ms)
把/users/2251663/moments这段放到前一行末尾去
比如我要得到这样的结果Completed 200 OK in 13ms (Views: 6.5ms | ActiveRecord: 2.5ms) /users/2251663/moments