Answer the question
In order to leave comments, you need to log in
Tail: inotify cannot be used, reverting to polling: Too many open files?
I'm doing this simple chat. We launch it through the console.
#!/bin/bash
echo "Please enter your name:"; read USER
echo "[$(date)] ${USER} joined the chat" >> ./chat.log
echo "[$(date)] Welcome to the chat ${USER}!"
tail -n 0 -f ./chat.log --pid=$$ | grep --line-buffered -v "] ${USER}>" &
while read MSG; do echo "[$(date)] ${USER}> ${MSG}" >> ./chat.log; done
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question