次のようなログファイルがあります。
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」の間に表示されるものをすべて印刷しようとしています。
私の試みでは、2 つの単語自体を削除することしかできませんでした。
tail -500 $rfile | grep "INFO.*joined the game" | \
sed -e 's/\[INFO\]\(.*\)joined/\1/'
手伝ってくれますか?