求 grep 正则表达式
载舟之水 2017-01-25 01:42:15 最近处理一个log文件,想用grep来格式化输出。
cat test.txt
01-25 11:56:41.873: I/NormalDanmakuPresenter(7831): #2017-01-25 11:56:41.872 [7831,1]I# [Normal] Msg,content:BDC{mType=MANAGER_MSG, mName='Batman', mContent='What?', currentTime=1485316601865, vuid=518465805}
怎么使用grep输出这种格式,grep小白,大家别见笑。
01-25 11:56:41.873 Batman What?
我试了下用
grep -Eo 'mName.+mContent[^ ]+' test.txt
只能输出
mName='Batman', mContent='What?',
开头时间不知道怎么取,格式也不对。
过年了还有人回答吗,求教。