Article 58M1A [BASH] Multiplex the output of two or more commands to standard output

[BASH] Multiplex the output of two or more commands to standard output

by
ychaouche
from LinuxQuestions.org on (#58M1A)
Dear #LQ,

I would like to get any errors from 3 different logs in real time on the terminal.

Separately, the three commands that would do that, if they were run in sperate terminals/consoles, would be :

1/ tail -f /var/log/mail.warn
2/ tail -f /var/log/dovecot.log | egrep -i '(warn|critic|error)'
3/ tail -f /var/log/fail2ban.log | egrep -i '(warn|critic|error)'

How can I combine these three commands into one such that the output from all three would be shown at the same time continuously ?

I know that tail -f can take more than one file, but what about the tail -f | grep commands ?latest?d=yIl2AUoC8zA latest?i=79glB1iIn9w:_lhLYYoyEK8:F7zBnMy latest?i=79glB1iIn9w:_lhLYYoyEK8:V_sGLiP latest?d=qj6IDK7rITs latest?i=79glB1iIn9w:_lhLYYoyEK8:gIN9vFw79glB1iIn9w
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments