mirror of
https://github.com/rasbt/python_reference.git
synced 2024-11-23 20:11:13 +00:00
added chmod command
This commit is contained in:
parent
040b553a00
commit
a22919a1fa
|
@ -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 {} \;
|
||||
# removes temporary files
|
||||
find . -name "*.bak" -exec rm -rf {} \;
|
||||
|
||||
# makes Python scripts executable
|
||||
chmod ug+x *.py
|
Loading…
Reference in New Issue
Block a user