bound
is a command line tool with behavior similar to
C++'s
std::lower_bound:
given a string and a file (or stdin), bound
returns
the first line whose value is greater than or equal to
the given string.
If the -f i
option is specified, bound
returns the
first line whose i-th field is greater than or equal to
the given string.
Fields are delimited by the space character (' ') by
default, but can the delimiter can be specified with
the -d
option.
The line number --- instead of the line itself --- can
be returned with the -i
option.
Thomas Fischer