Skip to content

Instantly share code, notes, and snippets.

@daschl
Created March 15, 2013 10:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daschl/5168856 to your computer and use it in GitHub Desktop.
Save daschl/5168856 to your computer and use it in GitHub Desktop.
quick replace with check.
<?php
if(!isset($argv[1]) || !isset($argv[2])) {
echo "Not enough arguments\n";
exit(-1);
}
$infile = $argv[1];
$outfile = $argv[2];
$content = str_replace("couchbase.so", "couchbase.dll", file_get_contents($infile));
file_put_contents($outfile, $content);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment