#! /usr/bin/env considered harmful - Programming On Unix

Users browsing this thread: 1 Guest(s)
robotchaos
Long time nixers
i) correct interpreter indeed. If you are on a shared server and are setting up a cron job that uses the absolute path to the python binary /usr/bin/python2.7, can you even still be sure that the executable is the one intended to complete the job? Or does shebanging absolutely give you checksumming powers?

ii) https://www.python.org/dev/peps/pep-0370/

iii) byoi(nterpreter)

iv) no flags? fine, don't use shebang on interpreted scripts. $ /usr/bin/python2.7 -RE ~/myscript

v) manage $PATH -- I fail to see the problem

vi) I feel like #!/usr/bin/env is suitable in the most properly configured environments; and in that case, more suited

Good read though :)


Messages In This Thread
#! /usr/bin/env considered harmful - by jkl - 14-09-2016, 12:27 PM
RE: #! /usr/bin/env considered harmful - by venam - 14-09-2016, 01:04 PM
RE: #! /usr/bin/env considered harmful - by z3bra - 14-09-2016, 01:36 PM
RE: #! /usr/bin/env considered harmful - by jkl - 14-09-2016, 08:13 PM
RE: #! /usr/bin/env considered harmful - by robotchaos - 14-09-2016, 11:27 PM
RE: #! /usr/bin/env considered harmful - by z3bra - 15-09-2016, 05:40 AM
RE: #! /usr/bin/env considered harmful - by z3bra - 15-09-2016, 09:14 AM