Skip to content

Instantly share code, notes, and snippets.

@jensens
Created April 23, 2016 13:46
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 jensens/43965a2d25c26dd691fd549ba492fd48 to your computer and use it in GitHub Desktop.
Save jensens/43965a2d25c26dd691fd549ba492fd48 to your computer and use it in GitHub Desktop.
Add UTF8 headers to python files if not already in place
find . -name "*.py"|while read fn;do head -n1 "$fn"|grep -qv "^# \-\*\- coding" && sed -i "1i # -*- coding: utf-8 -*-" $fn;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment