On Wed, Jul 13, 2005 at 06:29:27PM -0700, Sorav Bansal wrote:
> I often use the 'sort' program often for sorting text files. Recently, I
> had to write a binary search utility that can search for a key in a file
> sorted using the 'sort' program.
Why not just use look(1)? On my GNU/Linux system here, that comes
with "bsdmainutils".
> Since bsearch is a common operation on sorted files, I imagine it will
> be a useful utility to add to coreutils. If there is enough interest, I
> would be happy to write and maintain bsearch for coreutils. The basic
> program functionality is already working and tested, and it needs
> support for more command-line options and documentation before it is
> ready for coreutils.
If there is a consensus to add this, I'd have a preference for a usage
pattern which is consistent with look(1).
Regards,
James.