ThinkThen

Yes or no, per record

filter: keep the records where the answer is yes.

filter keeps the two complaints: the broken zipper and the snapped strap.
question="Is this a complaint?"

cat <<'EOF' |
Arrived a day early. Thank you!
The zipper broke the first time I used it.
Does this come in blue?
The strap snapped on day two.
EOF
thinkthen filter "$question" --batch 1
Output
The zipper broke the first time I used it.
The strap snapped on day two.
exit 0: the run finished

You give it one yes-or-no question and many records. You get back the records that pass, byte for byte, in the order they went in.

Read the answer

No record sets the exit code. A record under the threshold is dropped.

Exit codeWhat it means
0the run finished
2usage or input error
4the backend failed or refused, as it does for evidence over the size limit
5a local failure
70a defect in the tool

Call it from your language

The Bash example opens this page.

Jobs that use filter

Watch filter answer questions about Beatles songs: filter keeps what clears your bar.