This topic created in 3898 days ago, the information mentioned may be changed or developed.
Linux 系统里面的 log 都是直接往文本里面写的。
我需要的是,希望能实时的把新出现的每行作为一个参数输入到我的某个脚本里进行实时分析。
问问看看大家有没有什么方法
3 replies • 2016-03-04 14:12:28 +08:00
 |
|
ETiVMar 4, 2016 via iPhone
1
tailf path/to/your/log | your_program
|
 |
|
./your_program | xargs tailf -n 1 path/to/your/log
|
 |
|
阿么,你为何不换个角度让你的脚本实时的去读日志文件。。看新追加的信息,
|