Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
2017-10-19 - Eliminate Zero-width Spaces (\u200b) from PHP Source Files
#!/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
You can’t perform that action at this time.