|
2 | 2 | # xan bisect |
3 | 3 |
|
4 | 4 | ```txt |
5 | | -Search for rows where the value in <column> matches <value> using binary search. |
6 | | -It is assumed that the INPUT IS SORTED according to the specified column. |
| 5 | +Search for rows where the value in <column> matches <value> using binary search, |
| 6 | +and flush all records after the target value. |
| 7 | +The default behavior is similar to a lower_bound bisection, but you can exclude |
| 8 | +records (equivalent to upper_bound) with the target value using the -E/--exclude |
| 9 | +flag. It is assumed that the INPUT IS SORTED according to the specified column. |
7 | 10 | The ordering of the rows is assumed to be sorted according ascending lexicographic |
8 | 11 | order per default, but you can specify numeric ordering using the -N or --numeric |
9 | 12 | flag. You can also reverse the order using the -R/--reverse flag. |
| 13 | +Use the -S/--search flag to only flush records matching the target value instead |
| 14 | +of all records after it. |
10 | 15 |
|
11 | 16 | Usage: |
12 | 17 | xan bisect [options] [--] <column> <value> <input> |
13 | 18 | xan bisect --help |
14 | 19 |
|
15 | 20 | bisect options: |
| 21 | + -E, --exclude When set, the records with the target value will be |
| 22 | + excluded from the output. By default, they are |
| 23 | + included. Cannot be used with -S/--search. |
| 24 | + TODO: not equivalent to upper_bound |
16 | 25 | -N, --numeric Compare according to the numerical value of cells |
17 | 26 | instead of the default lexicographic order. |
18 | 27 | -R, --reverse Reverse sort order, i.e. descending order. |
| 28 | + -S, --search Perform a search on the target value instead of |
| 29 | + flushing all records after the value (included). |
| 30 | + Cannot be used with -E/--exclude nor -e/--end. |
| 31 | + -e, --end <end-value> When set, the records after the target value will be |
| 32 | + flushed until <end-value> is reached (included). |
| 33 | + By default, all records after the target value are |
| 34 | + flushed. Cannot be used with -S/--search. |
| 35 | + -v, --verbose |
19 | 36 |
|
20 | 37 | Common options: |
21 | 38 | -h, --help Display this message |
|
0 commit comments