我有一个这样的日志文件:
2013-07-10 21:40:54 [INFO] Janus_Mesca joined the game
2013-07-10 21:40:54 [INFO] Fenlig joined the game
2013-07-10 21:41:21 [INFO] BigRedHoodie joined the game
我正在尝试打印“[INFO]”和“joined”之间出现的任何内容。
通过我的尝试,我只能自己删除这两个词。
tail -500 $rfile | grep "INFO.*joined the game" | \
sed -e 's/\[INFO\]\(.*\)joined/\1/'
你能帮我吗?