Skip to content

Instantly share code, notes, and snippets.

@GuyPaddock
Created November 6, 2018 16:51
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 GuyPaddock/f4a9fcad575a871eedee0fcfaea0ef61 to your computer and use it in GitHub Desktop.
Save GuyPaddock/f4a9fcad575a871eedee0fcfaea0ef61 to your computer and use it in GitHub Desktop.
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