On 06/30/2012 09:32 PM, Daniel Brown wrote:
<?php
$ssh_entries = explode(PHP_EOL,trim(`tail /var/log/syslog | awk
{'print $1,$2,$3 "|" $5 "|" $11'}`));
This will tail a default number of lines.
I'm looking for a way to identify the last line, and when launching the
PHP script I get the added line between now and that last one.
There is a "logtail" utility in the "logtool" package, but I want a full
PHP equivalent.
The "logtail" utility inserts a "marker" in the logfile, which I find
intrusive and requiring root privilege.
My guess is identifying lines with hash or storing the last line in e
tmp file, or...
I'm looking for the least worst solution.
--
RMA.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php