- 论坛徽章:
- 780
|
回复 1# tianer
注释这两句这样好像可以,但要中间再写入另一个文件,
新手表示不会了。- awk '/SET INSERT_ID=/,/tradelog/{if(i++==0)$0="#"$0} /auction/{$0="#"$0}NF+=0' i
复制代码- #131203 16:58:16 server id 1 end_log_pos 15367471 Intvar
- #SET INSERT_ID=263/*!*/;
- # at 15367471
- #131203 16:58:16 server id 1 end_log_pos 15367803 Query thread_id=6585 exec_time=0 error_code=0
- SET TIMESTAMP=1386107896/*!*/;
- insert into tradelog (guid,sellguid,in_datetime,pricetype,price,goodid,goodnum)values( NAME_CONST('iguid',41909), NAME_CONST('isellguid',5907),now(), NAME_CONST('ipr
- icetype',0), NAME_CONST('iprice',10000), NAME_CONST('igoodid',1022), NAME_CONST('igoodnum',1))
- /*!*/;
- # at 15367803
- #131203 16:58:16 server id 1 end_log_pos 15367830 Xid = 245014580
- COMMIT/*!*/;
- # at 15367830
- #131203 16:58:16 server id 1 end_log_pos 15367900 Query thread_id=6585 exec_time=0 error_code=0
- SET TIMESTAMP=1386107896/*!*/;
- BEGIN
- /*!*/;
- # at 15367900
- #131203 16:58:16 server id 1 end_log_pos 15368021 Query thread_id=6585 exec_time=0 error_code=0
- SET TIMESTAMP=1386107896/*!*/;
- #delete from auction where guid= NAME_CONST('iguid',5907)
- /*!*/;
- # at 15368021
- #131203 16:58:16 server id 1 end_log_pos 15368048 Xid = 245014582
复制代码 |
|