I found this clever solution: (echo -e "cmd 1\ncmd 2" && cat) | ./shell_executable
This does the trick. cat will pump inread additional input (until EOF) and pass that to the output ofpipe after the echo has put its arguments into the input stream of shell_executable & wait for more inputs until EOFshell_executable.