The main post to be deleted must be counted in the log file, and the log file is separated by tab characters. Assume that the log file name is delete. log.
Save the format and save the data as follows,
Delete date post type (11 as the main post, 12 as the reply) Post id operator id
12 71163578 1153089
11 71163800 134379
12 71163801 134379
11 71151662 2064561
2011-11-01 00:42 11 71163897 719476
11 71164159 2215597
12 71164712 2317663
12 71164820 111
12 71164841 622530
12 71164881 1999836
11 71163794 32254
12 71162281 32254
71165688 2296120
71165682 2296120
12 71165870 11568
11 71142268 1020
12 71167000 634940
11 70948995 604153
71167508 2100858
12 71168173 952148
From the log file, if you use the command cat delete. log | grep '11' | wc, all logs are collected.
You can see that each row has a tab (unspace) character on the left and right of 11, so you can use the regular expression "tab (unspace) 11tab (unspace)" for exact search.
However, if you use the command cat delete. log | grep '\ t11 \ T' | wc or cat delete. log | grep '\ t11 \ T' | one wc cannot be found.
In fact, there are two ways to correctly match the tab character in linux:
1: Use grep $ '\ t' for your file
2: press CTRL + V with grep, and then press TAB to press your file
Return to the problem above, you can use the following command
Cat delete. log | grep $ '\ t' 11 $' \ T' | wc
Or
Cat delete. log | grep 'ctrl + V, TAB11CTRL + V, tab' | wc
From the column in question 042