macOS / binaries /

look

/usr/bin/look
Display lines beginning with a given string

The look utility displays any lines in file which contain string as a prefix. As look performs a binary search, the lines in file must be sorted.

source: man