Inside a BASH script we can have multiple processes running in background which intercommunicate using named pipes, FIFOs registered on the filesystem. An example of this could
I just want to point out that ugly hacks didn't wish to be born that way.
node -e "require('net').createServer(function(s){s.pipe(process.stdout)}).listen(1337)"
echo "write clean code they said" > /dev/tcp/localhost/1337
echo "it will pay off they said" > /dev/tcp/localhost/1337
Works even in MSysGit's Bash for Windows, to my surprise.