Peterhpeterh 94011 gold badge88 silver badges1818 bronze badges one Most if not your whole problems are previously tackled in other responses listed here. None of the current answers recommend active loops. Having said that, It appears convoluted and brittle to me. It will not work on Linux/FreeBSD/MacOS implementations which do https://emmaq417xua2.wikikali.com/user