You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: subsections/h3-prep.inc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -32,16 +32,16 @@ To change the shebangs in the files you can use one (or a combination) of the fo
32
32
.. code-block:: console
33
33
34
34
# Change shebang in individual files
35
-
sed -i '1s_^#!/usr/bin/\(python\|env python\)$_#!/usr/bin/python3_' path/to/file1 file2 file3 ...
35
+
sed -i '1s_^#!/usr/bin/\(python\|env python\)_#!/usr/bin/python3_' path/to/file1 file2 file3 ...
36
36
37
37
# Change shebang inall files in this directory andall subdirectories
38
38
# See `man find` for how the `-exec command ;` syntax works
39
-
find . -type f -exec sed -i '1s_^#!/usr/bin/\(python\|env python\)$_#!/usr/bin/python3_'{} \;
39
+
find . -type f -exec sed -i '1s_^#!/usr/bin/\(python\|env python\)_#!/usr/bin/python3_'{} \;
40
40
41
41
# Change shebang inall executable files in this directory andall subdirectories
42
-
find . -type f -executable -exec sed -i '1s_^#!/usr/bin/\(python\|env python\)$_#!/usr/bin/python3_'{} \;
42
+
find . -type f -executable -exec sed -i '1s_^#!/usr/bin/\(python\|env python\)_#!/usr/bin/python3_'{} \;
43
43
44
-
You don't have to worry about accidentally corrupting other files as these scripts will only change a file if its first line exactly matches one of the two aforementioned shebangs.
44
+
You don't have to worry about accidentally corrupting other files as these scripts will only change a file if the beginning of its first line exactly matches one of the two aforementioned shebangs.
0 commit comments