How can I pipe initial input into process which will then be interactive?

You don’t need to write a new tool to forward stdin – one has already been written (cat):

(echo "initial command" && cat) | some_tool

This does have the downside of connecting a pipe to some_tool, not a terminal.

Leave a Comment