Skip to content

Instantly share code, notes, and snippets.

@ratazzi
Created July 10, 2011 02:17
Show Gist options
  • Save ratazzi/1074169 to your computer and use it in GitHub Desktop.
Save ratazzi/1074169 to your computer and use it in GitHub Desktop.
#!/usr/bin/env php
<?php
if (!empty($argv[1])) {
$t = strtotime($argv[1]);
}
$fp = fopen('php://stdin', 'r');
while(!feof($fp)) {
$line = fgets($fp, 255);
if (empty($line)) continue;
$mtime = filemtime(trim($line));
if ((int)$mtime > $t) {
#echo date('Y-m-d H:i:s', (int)$mtime), ' ', $mtime, ' ';
echo $line;
}
}
fclose($fp);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment