grep을 쓰다 보면 matching된 부분의 위 또는 아래 몇 줄을 더 출력해서 봐야할 때가 있다. 그럴 때, 유용하다. A, B, C 옵션을 아래와 같이 사용하면 N줄이 출력된다. grep -A N -B N -C N A는 뒤로 N줄 B는 앞의 N줄 C는 앞,뒤로 N줄 -B, --before-context=NUM print NUM lines of leading context -A, --after-context=NUM print NUM lines of trailing context -C, --context=NUM print NUM lines of output context