run.sh: Avoid subshell

Do the sed magic and socat spawning in the same script to avoid spawning
a subshell for the socat calls.