2008-04-02 gerpで指定した行の前後を表示する linux 以下の例ではgrepして前後3行を表示している tail -f /var/log/maillog | grep -A 3 -B 3 test@fugafuga.fuga 参照元 http://www.atmarkit.co.jp/flinux/rensai/linuxtips/137greplineplus.html