All pastes #977586 Raw Edit

Stuff

public text v1 · immutable
·published 2008-04-08 22:49 UTC
rendered paste body
lahey:parser $ ls -tahl my.log 
-rw-r--r--  1     93K Apr  7 17:47 my.log

lahey:parser $ cat parse.php
<?php

if ($argc >1)
{
    $filearray = file($argv[1]);

    while (list(,$oneline) = each($filearray))
    {
        if (!preg_match('/ENV/', $oneline, $match))

            echo $oneline;
    }
}
else
{
    echo "Usage is:   php parse.php filename\n";
}

?>


lahey:parser $ php parse.php my.log  > new.txt
lahey:parser $ ls -talh new.txt 
-rw-r--r--  1     57K Apr  7 20:31 new.txt