

The quoting oversight was due to me testing the first one only on zsh, which quotes differently.
The second was tested on Busybox ash and dash against the input in the example. It does assign a number just smaller or equal to threshold because head is overwritten on each iteration until it lands on the last value that was less than or equal to the threshold.
what even was that about freedom zero? as if freedom zero meant all free software must be accepted in all repositories?? you are still free to run it regardless