I would like to put a process into the background, and then pipe data to it multiple times. For example:
cat & # The command I want to write into
cat_pid=$! # Getting the process id of the cat process
echo hello | $cat_pid # This line won't work, but shows what I want to
# do: write into the stdin of the cat process
So I have the PID, how can I write into that process? I would be open to launching the cat process in a different way.
Also, I'm on Mac, so I can't use /proc
:(