3 ms·
> using env instead If this method is superior, why hasn't it caught on with Bash I wonder (it's considered standard with Python and Node at least)? > Though
by spurgu 6y ago
> using env instead
If this method is superior, why hasn't it caught on with Bash I wonder (it's considered standard with Python and Node at least)?
> Though personally if I was worried about portability then I’d just write the script in vanilla sh instead.
Agreed.
- laumars 6y ago> If this method is superior, why hasn't it caught on with Bash I wonder (it's considered standard with Python and Node at least)? Because if you need a portable bash then you target sh. But if you want a portable Python then you still target Python.
- josefx 6y ago> But if you want a portable Python then you still target Python I am still supporting systems that came with Python 2. You get portable Python the same way you get portable bash: build and deploy the interpreter with your code.
- laumars 6y agoYou’re missing my point. If you’re targeting Python then you need Python installed however you don’t always know where that executable might live. Whereas if you’re targeting shell scripts then you can always fallback to regular Bourne shell if you need portability and that should always have an executable or simlink in /bin/sh. The Python 2 problem is a whole other topic :)