using watch , tail and ccze together

2019-09-10 06:10发布

I have used watch and tail together like this:

watch -n 5 tail -n 15 mylogfile.txt

Also I have used tail and ccze for colorizing log file as below:

tail -f -n 50 mylogfile.txt | ccze

But I dont know how should I use all of these three together in a single command. Does any one have any idea?

1条回答
我欲成王,谁敢阻挡
2楼-- · 2019-09-10 06:50

Recent versions of watch has -c | --color option, so perhaps this will work for you:

watch -n 5 -c 'tail -f -n 50 mylogfile.txt | ccze'
查看更多
登录 后发表回答