I frequently use grep
's context command line options (-A
, -B
, and -C
), but occasionally I want to view the whole file with matching expressions highlighted. To accomplish this currently I simply specify -C 999999999
, but this seems silly.
Is there an option within OS X's bundled grep
that will allow me to easily take advantage of grep's matching and colorizing features, without hiding any file content?
grep
" explicitly because I know that this is BSDgrep
, and I would rather not install GNU's whole coreutils, assuming GNUgrep
has this built in. – Jason Salaz Aug 03 '12 at 08:14alias grep='/usr/bin/grep -C 999999999'
in interactive shells and forget about it. – nohillside Aug 03 '12 at 09:21alias grepall='/usr/bin/grep -C 999999999'
) – Jason Salaz Aug 03 '12 at 09:29