10 Jan
2006
10 Jan
'06
10:22
Thanks to all who responded. mkfifo -m 666 /tmp/fifo # exec - execute commands and open, close, or copy file descriptors # the file descriptor has to be opened with an exec !!! exec 42<> /tmp/fifo while true do while read -t 5 data <&42 do echo "data is ($data)" done echo "read again" done There is nothing magical about the 42, any number will do, but try to avoid stdin, stdout and stderr. The example allows anyone to send something to /tmp/fifo, e.g. echo "command" > /tmp/fifo and the code snipped can act accordingly. Peter