
#!/bin/bash

#This script writes to a named pipe.  If an arguement is passed it writes this 
# otherwise it writes a line of text Hello from PID

pipe=testpipe

if [[ ! ‐p $pipe ]]; then
  echo "Reader not running"
  exit 1
fi


if [[ "$1" ]]; then
  echo "$1" >$pipe
else
  echo "Hello from $$" >$pipe
fi



