Sorav Bansal wrote:
Is there a utility to search for a value in a sorted file using binary
search. The file was sorted using the 'sort' command.
thanks!
Sorav
Is there any reason why you want to use a binary search, except for speed?
Unless the lines are fixed-length, after each chop, the search program
will have to find the start-of-line character.
This is likely to negate any advantage gained from binary searches.
I'd sugest just sticking to grep. You can use the '-l' (ell) option -
this will exit when the first matching line is found, (but not display
it).
Colin S. Miller
_______________________________________________
help-gnu-utils mailing list
help-gnu-utils@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-utils