3 ms·
This is good, but it's sad that #!/usr/bin/env python will no longer work as the go-to shebang since python won't exist, only python3 will exist by default. Ge
by welder 9y ago
This is good, but it's sad that #!/usr/bin/env python will no longer work as the go-to shebang since python won't exist, only python3 will exist by default.
Geofft[1] has a nifty solution but it's not as cross platform as the old tride-n-true #!/usr/bin/env python:
#!/bin/sh
""""type python3 >/dev/null 2>&1 && exec python3 "$(readlink -f "$0")" "$@" #"""
""""exec python "$(readlink -f "$0")" "$@" #"""
[1] https://ldpreload.com/blog/usr-bin-python-23 https://ldpreload.com/blog/usr-bin-python-23