Skip to content

Instantly share code, notes, and snippets.

@cristianossd
Created June 1, 2020 17:34
Show Gist options
  • Save cristianossd/43e20c03284273c6953519aebeaa9fe6 to your computer and use it in GitHub Desktop.
Save cristianossd/43e20c03284273c6953519aebeaa9fe6 to your computer and use it in GitHub Desktop.
Insert utf-8 encoding at beginning of python file
files=$(find . -name '*.py')
for file in $files; do
echo "# -*- coding: utf-8 -*-\n$(<$file)" > $file
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment