Created
November 6, 2018 16:51
-
-
Save GuyPaddock/f4a9fcad575a871eedee0fcfaea0ef61 to your computer and use it in GitHub Desktop.
2017-10-19 - Eliminate Zero-width Spaces (\u200b) from PHP Source Files
This file contains 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
#!/bin/env bash | |
for f in $(find . -name '*.php'); do | |
directory=$(dirname "${f}"); | |
mkdir -p "../processed/${directory}"; | |
cat "${f}" | tr "$(printf %b '\u200b')" " " > "../processed/${f}"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment