Add an empty line on the top and the bottom of the input files.
cat 1-big.txt | jq --raw-input -f 1-1.jq
cat 1-big.txt | jq --raw-input -f 1-2.jq
jq -nRf 2-1.jq 2-big.txt
jq -nRf 2-2.jq 2-big.txt
uses an undocumented function _nwise
for chunking.
jq -nRf 3-1.jq 3-big.txt
jq -nRf 3-2.jq 3-big.txt
jq -nRf 4-1.jq 4-big.txt
jq -nRf 4-2.jq 4-big.txt
jq -nRf 5-1.jq 5-big.txt
jq -nRf 5-2.jq 5-big.txt
jq -nRf 6-1.jq 6-big.txt
jq -nRf 6-2.jq 6-big.txt
jq -nRf 7-1.jq 7-big.txt
jq -nRf 7-2.jq 7-big.txt
jq -nRf 8-1.jq 8-big.txt
jq -nRf 8-2.jq 8-big.txt
There's an off-by-one in part 1 solution. On test data it correctly produces 13, on the big input it produces 6174 instead of 6175.
jq -nRf 9-1.jq 8-big.txt