Skip to content

Commit a22919a

Browse files
committed
added chmod command
1 parent 040b553 commit a22919a

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

useful_scripts/prepend_python_shebang.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@
77
# instead of
88
# >> python myscript.py
99

10+
# prepends !#/usr/bin/python to all .py files
1011
find ./ -maxdepth 1 -name "*.py" -exec sed -i.bak '1i\
1112
!#/usr/bin/python
1213
' {} \;
1314

14-
find . -name "*.bak" -exec rm -rf {} \;
15+
# removes temporary files
16+
find . -name "*.bak" -exec rm -rf {} \;
17+
18+
# makes Python scripts executable
19+
chmod ug+x *.py

0 commit comments

Comments
 (0)