$needle = 'qwerty'; $f = fopen('file', 'r'); $w = fopen('result', 'a'); while(!feof($f)){ $str = fgets($f); if(!stristr($str, $needle)) fputs($w, $str); } fclose($f);fclose($w);
cat input_file | grep -v qwerty > output_file