diff --git a/useful_scripts/prepend_python_shebang.sh b/useful_scripts/prepend_python_shebang.sh index cff7677..74c89c3 100644 --- a/useful_scripts/prepend_python_shebang.sh +++ b/useful_scripts/prepend_python_shebang.sh @@ -7,8 +7,13 @@ # instead of # >> python myscript.py +# prepends !#/usr/bin/python to all .py files find ./ -maxdepth 1 -name "*.py" -exec sed -i.bak '1i\ !#/usr/bin/python ' {} \; -find . -name "*.bak" -exec rm -rf {} \; \ No newline at end of file +# removes temporary files +find . -name "*.bak" -exec rm -rf {} \; + +# makes Python scripts executable +chmod ug+x *.py \ No newline at end of file