title: bash or python script to read binary data from STDIN and save to a file
body: <p>Before anyone tells me, I completely realize what I'm trying to do is absurd but I have my reasons.</p>
  
  <p>I have a server on which I can write a script (bash or python). The script needs to accept binary data from STDIN and save it to a file. To be precise, the binary data is a WAV file.</p>
  
  <p>What I am doing is using an iOS app called Workflow. The app will let me record an audio file and then send it as STDIN input to a script that it will run over SSH. So my script needs to take that STDIN input and save it to a file.</p>
  
  <p>Any ideas/thoughts? I'm completely lost on where to start.</p>