
#!/bin/bash

#This script creates a named pipe and then reads from it until it sees 'quit'
#

pipe=testpipe

echo "try to create $pipe"
#trap "rm ‐f $pipe" EXIT

if [[ ! ‐p $pipe ]]; then
  mkfifo $pipe
fi


#while true
#do
  if read line <$pipe; then
    if [ "$line" == 'quit' ]; then
      break
    fi
    echo $line
  fi
#done

echo "Reader exiting"




