Skip to content

Commit 46e9851

Browse files
committed
Update sed line to be even more perfect
1 parent 6909a51 commit 46e9851

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsections/h3-shebangs.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To change the shebangs in the files you can use one (or a combination) of the fo
4242
.. code-block:: console
4343
4444
$ # Change shebang in individual files
45-
$ sed -i '1s=^#!/usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' path/to/file1 file2 file3 ...
45+
$ sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python3}=' path/to/file1 file2 file3 ...
4646
4747
$ # Change shebang in all relevant files in this directory and all subdirectories
4848
$ # See `man find` for how the `-exec command {} +` syntax works

0 commit comments

Comments
 (0)