We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80fb307 commit f71bcdeCopy full SHA for f71bcde
1 file changed
useful_scripts/prepend_python_shebang.sh
@@ -8,8 +8,10 @@
8
# >> python myscript.py
9
10
# prepends !#/usr/bin/python to all .py files
11
+
12
+python_ver=$(which python)
13
find ./ -maxdepth 1 -name "*.py" -exec sed -i.bak '1i\
-#!/usr/bin/env/python
14
+#!/usr/bin/env/python"$python_ver"
15
' {} \;
16
17
# removes temporary files
0 commit comments