I bet there's a lost history (or oral history, but they're the nearly same after 60+ years) of tools exactly like this that goes back to the times of the PDP-1 and super early hacker culture.
And I bet there's been a version of it written for every operating system at some point. It just seems so necessary and relatively straight forward.