Created
August 5, 2014 11:26
-
-
Save cmfcmf/78b65318994660d6665e to your computer and use it in GitHub Desktop.
Remove soft hypens in all files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "root/tmp", | |
"require": { | |
"symfony/finder": "*" | |
}, | |
"authors": [ | |
{ | |
"name": "cmfcmf" | |
} | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require('vendor/autoload.php'); | |
use Symfony\Component\Finder\Finder; | |
$finder = new Finder(); | |
$finder->files()->in(__DIR__ . '/MostGenerator'); | |
foreach ($finder as $file) { | |
$path = $file->getRealpath(); | |
$text = file_get_contents($path); | |
file_put_contents($path, str_replace('', '', $text)); | |
} | |
exit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment