开发者

How do I process captured output from `tail` without reprocessing?

开发者 https://www.devze.com 2023-01-09 02:55 出处:网络
I want to excecute a tail command in Unix for indefinite time and capture its output in a Perl script, process it and store certain data into a database. But it should be live, meaning old data – onc

I want to excecute a tail command in Unix for indefinite time and capture its output in a Perl script, process it and store certain data into a database. But it should be live, meaning old data – once stored in the database – shouldn't be reprocessed. It should only capture, and process only the most recent output.

Can someone please tell me how can this be d开发者_StackOverflow社区one? Thanks in anticipation.


Try File::Tail which can handle multiple files at same time.

0

精彩评论

暂无评论...
验证码 换一张
取 消