I want to show messages from a logfile in realtime on desktop. (xfce4 on fedora 24)My idea is to do this by using notify-send and tail -f in a shell script.So far I have two shell scripts:read_data.shwrite_data.shBoth fork a process and communicates via a pipe.write_data.sh:tail -f /var/log/logfile > mypiperead_data.sh:mkfifo mypipewhile truedo    echo read now from pipe    if read line <mypipe; then        echo $line    fidoneUnfortunately I get an error message:EPIPE (Broken pipe)I used strace to analyze what's going on:write_data.sh:strace tail -f /var/log/logfile > mypipe....write(1, Message from logfile..., 281) = -1 EPIPE (Broken pipe)--- SIGPIPE {si_signo=SIGPIPE, si_code=SI_USER, si_pid=7314, si_uid=0} ---+++ killed by SIGPIPE +++strace read_data.sh...read(0, \n, 1)                        = 1dup2(10, 0)                             = 0fcntl(10, F_GETFD)                      = 0x1 (flags FD_CLOEXEC)close(10)                               = 0open(., O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3fstat(3, {st_mode=S_IFDIR|0550, st_size=4096, ...}) = 0getdents(3, /* 133 entries */, 32768)   = 5400getdents(3, /* 0 entries */, 32768)     = 0close(3)                                = 0write(1, message from logfile ....) = 62rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0write(1, read now from pipe\n, 19read now from pipe)    = 19open(/tmp/mypipe, O_RDONLYread_data.sh blocks at this point.Any idea why this happens?
show messages from logfile in realtime on desktop
pipe