Skip to content

Commit 8ca2852

Browse files
committed
syntax fix
1 parent c031649 commit 8ca2852

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Sebastian Raschka 05/21/2014
22
# Shell script that prepends a Python shebang
3-
# e.g., `!#/usr/bin/python` to all
3+
# '#!/usr/bin/env python' to all
44
# Python script files in the current directory
55
# so that script files can be executed via
66
# >> myscript.py
77
# instead of
88
# >> python myscript.py
99

10-
# prepends e.g., !#/usr/bin/python to all .py files
10+
# prepends '#!/usr/bin/env python' to all .py files
1111

1212
find ./ -maxdepth 1 -name "*.py" -exec sed -i.bak '1i\
13-
#!'"$(which python)"'
13+
#!/usr/bin/env python
1414
' {} \;
1515

1616
# removes temporary files
1717
find . -name "*.bak" -exec rm -rf {} \;
1818

1919
# makes Python scripts executable
20-
chmod ug+x *.py
20+
chmod ug+x *.py

0 commit comments

Comments
 (0)