Job control with sh
is quite unpleasant. I’m trying to throw together a script that allows a REPL to work with pipes as input. The following example works.
while true do cat pipes/i done | sh -xv > pipes/o 2> pipes/e
Termination, however, is a horse of a different color. Echoing exit
into pipes/i
presumably kills the shell, but the loop runs forever.