- Published on
Short engineering note
Coprocess communication with coproc
- Authors

- Name
- Mehdi Akiki
Note · Engineering notes
Start a coprocess:
coproc myproc { some-server --interactive; }
echo "request" >&${myproc[1]}
read -r response <&${myproc[0]}
Tip: coproc is handy for talking to interactive commands without ptys.