shell - Ommit lines containing a specific pattern or string in a tail -f output -
everything in title think. here's little more info : write lot of data log file want tail -f
on separate screen. want data written file don't need in tail -f
output. example instead of having
= 2016-11-10 17:11:06 ========================================================== pong not logged ================================================================================ = 2016-11-10 17:11:07 ========================================================== pong stan ================================================================================ = 2016-11-10 17:11:07 ========================================================== matchmaking { id: '20', email: 'stanley@beatme.io', gender: 'male', fbid: '167198360375634', console: '5', game: '5', beatmeid: 'stan', fairplay: 100, victories: 32, wallet: 11950 } ================================================================================ = 2016-11-10 17:11:07 ========================================================== user stan started matchmaking ================================================================================ matchmaking : user stan joined user 20 resumed matchmakingactivity = 2016-11-10 17:11:08 ========================================================== pong not logged ================================================================================ ================================================================================ = 2016-11-10 17:11:08 ========================================================== pong kejjimourad ================================================================================ = 2016-11-10 17:11:09 ========================================================== pong not logged ================================================================================ matched players kijey , stan trystartgame 5-5 areyouready [ 274, 20 ] matched 1 in 1 round = 2016-11-10 17:11:10 ========================================================== pong not logged ================================================================================ = 2016-11-10 17:11:10 ========================================================== notification sent { success: true, data: [object] } ================================================================================ = 2016-11-10 17:11:10 ========================================================== notification sent { success: true, data: { multicast_id: 8703116803504844000, success: 1, failure: 0, canonical_ids: 0, results: [ [object] ] } } ================================================================================ = 2016-11-10 17:11:10 ========================================================== pong kejjimourad ================================================================================ = 2016-11-10 17:11:11 ========================================================== pong stan ================================================================================
i wish ommit lines contain "pong" (and if possible 1 line above , 1 line under) have relevant information, ie :
= 2016-11-10 17:11:07 ========================================================== matchmaking { id: '20', email: 'stanley@beatme.io', gender: 'male', fbid: '167198360375634', console: '5', game: '5', beatmeid: 'stan', fairplay: 100, victories: 32, wallet: 11950 } ================================================================================ = 2016-11-10 17:11:07 ========================================================== user stan started matchmaking ================================================================================ matchmaking : user stan joined user 20 resumed matchmakingactivity matched players kijey , stan trystartgame 5-5 areyouready [ 274, 20 ] matched 1 in 1 round = 2016-11-10 17:11:10 ========================================================== notification sent { success: true, data: [object] } ================================================================================ = 2016-11-10 17:11:10 ========================================================== notification sent { success: true, data: { multicast_id: 8703116803504844000, success: 1, failure: 0, canonical_ids: 0, results: [ [object] ] } } ================================================================================
Comments
Post a Comment