给昌哥写的过滤的东东。
是实现了,但感觉丑,不规范。
记得下先。
原始数据格式:
2016-07-22 09:50:40 [ pool-2-thread-1:232231791 ] - [ DEBUG ] origin match time:09:50:21, user:180783710, orderId:ZAZWXNLN, orderQty:1100, matchedQty:400 2016-07-22 09:50:40 [ pool-2-thread-1:232231791 ] - [ DEBUG ] origin match time:09:50:28, user:180783710, orderId:ZAZWXNLN, orderQty:1100, matchedQty:600 2016-07-22 09:50:40 [ pool-2-thread-1:232231791 ] - [ DEBUG ] origin match time:09:50:29, user:187961920, orderId:HJZU28X1, orderQty:200, matchedQty:200 2016-07-22 09:50:40 [ pool-2-thread-1:232231791 ] - [ DEBUG ] origin match time:09:50:27, user:800076726, orderId:TJZU1ZVG, orderQty:7500, matchedQty:7500 2016-07-22 09:50:40 [ pool-2-thread-1:232231792 ] - [ DEBUG ] origin match time:09:50:36, user:184701119, orderId:NJZQ6DU7, orderQty:500, matchedQty:500 2016-07-22 09:50:40 [ pool-2-thread-1:232231792 ] - [ DEBUG ] origin match time:09:50:28, user:800491056, orderId:ZSZW6QST, orderQty:2000, matchedQty:2000 2016-07-22 09:50:40 [ pool-2-thread-1:232231792 ] - [ DEBUG ] origin match time:09:50:20, user:181807819, orderId:81065942, orderQty:567100, matchedQty:567100 2016-07-22 09:50:40 [ pool-2-thread-1:232231793 ] - [ DEBUG ] origin match time:09:50:16, user:187575665, orderId:70356862, orderQty:57773, matchedQty:57773 2016-07-22 09:50:40 [ pool-2-thread-1:232231793 ] - [ DEBUG ] origin match time:09:50:26, user:180808385, orderId:ZA351478, orderQty:1400, matchedQty:1400 2016-07-22 09:50:40 [ pool-2-thread-1:232231793 ] - [ DEBUG ] origin match time:09:50:12, user:184844436, orderId:PD199184, orderQty:1000, matchedQty:1000
grep "origin match time" lll.log |awk -F '[ :,]' '{printf("%s:%s:%s %s %s %s %s\n", $16, $17, $18, $21, $24, $27,$30)}' > xxx
时间: 2024-09-26 02:04:05