#!/usr/bin/php <?php $tab=file('/dev/stdin'); foreach ($tab as $a) if (strpos($a, $_SERVER['argv'][1])!==false) echo $a; ?>