title: Bash: Mailing output from continuosly running command
body: <p>I got a broker running. It is possible to subscribe to a channel of that broker in order to receive messages that have been published to a channel on this broker.
  My objective is to send each received message as email.</p>
  <p>My simplyfied command to subscribe to my brooker looks like to this:</p>
  <pre><code>brooker subscribe --host myhost -i user -c mychannel
  </code></pre>
  <p>When called from command line i receive messages when they are published as console output (the script keeps running!).
  The difficulty lies in capturing the output of my command and feeding it to a mail command.</p>
  <p>So far I tried to put the following simplified line into my bash script:</p>
  <pre><code>brooker subscribe --host myhost -i user -c mychannel | mail -s &quot;alert&quot; me@my.net
  </code></pre>
  <p>The mailing part has been tested and is functional.
  But i do not receive any emails at all when i run my script and publish messages in second console to a channel of the broker.</p>
  <p><strong>Question</strong>: How can i feed the continuosly incoming messages to my mail command.</p>