The Stack Overflow podcast is back! Listen to an interview with our new CEO.
2 added 307 characters in body
source | link

After grep -E "errors|warnings" myfifo > errors.log the pipe no longer contains data. So the next command cat myfifo which read from the pipe will be blocked.

If I understand your question correctly, you want to print all messages to stdout, and redirect all error and warning messages to errors.log. So if you want to use pipe, use two:

 mkfifo pipe1 pipe2 
 make 2>&1 | tee pipe1 pipe2 | grep -E "errors|warnings" pipe1 > errors.log | cat pipe2

After grep -E "errors|warnings" myfifo > errors.log the pipe no longer contains data. So the next command cat myfifo which read from the pipe will be blocked.

After grep -E "errors|warnings" myfifo > errors.log the pipe no longer contains data. So the next command cat myfifo which read from the pipe will be blocked.

If I understand your question correctly, you want to print all messages to stdout, and redirect all error and warning messages to errors.log. So if you want to use pipe, use two:

 mkfifo pipe1 pipe2 
 make 2>&1 | tee pipe1 pipe2 | grep -E "errors|warnings" pipe1 > errors.log | cat pipe2
1
source | link

After grep -E "errors|warnings" myfifo > errors.log the pipe no longer contains data. So the next command cat myfifo which read from the pipe will be blocked.