title: How to redirect stdin to a FIFO with bash
body: <p>I'm trying to redirect stdin to a FIFO with bash. This way, I will be able to use this stdin on an other part of the script.</p>
  
  <p>However, it doesn't seem to work as I want</p>
  
  <h2>script.bash</h2>
  
  <pre><code>#!/bin/bash
  
  rm /tmp/in -f
  mkfifo /tmp/in
  cat &gt;/tmp/in &amp;
  
  # I want to be able to reuse /tmp/in from an other process, for example : 
  xfce4-terminal --hide-menubar --title myotherterm --fullscreen -x bash -i -c "less /tmp/in"
  </code></pre>
  
  <p>Here I would expect , when I run <code>ls | ./script.bash</code>, to see the output of ls, but it doesn't work (eg the script exits, without outputing anything)</p>
  
  <p>What am I misunderstanding ?</p>