My script has this at the first line:
#!/usr/bin/python3.6
But in different system python3.6 is installed at different locations, such as:
/user/bin/python3.6 /tools/bin/python3.6 /user/local/bin/python3.6 How can I make my script good at the these 3 systems?
execve()syscall or its local equivalent, but it's the operating system kernel's job; the shell implementations, when/where they exist, are just as a fallback/workaround for OS bugs).execve?) is something few people realise, and also doesn’t affect this question.#!are interpreted as introducing a path to use as an interpreter. The shell's only involvement is when the OS decides it can't execute the file, at which point the shell may try something else. (bash, for example, forks itself to execute the file as abashscript; othershells assume the default system shell should be used.)