using watch , tail and ccze together

二次信任 提交于 2019-12-25 11:33:09

问题


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:


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'


来源:https://stackoverflow.com/questions/35670204/using-watch-tail-and-ccze-together

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!