easyoptions icon indicating copy to clipboard operation
easyoptions copied to clipboard

Update shebang

Open yorgabr opened this issue 4 years ago • 3 comments

As stated here:

https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html

... I've updated its shebang to make the script portable.

yorgabr avatar Nov 23 '20 00:11 yorgabr

  1. The appropriate change would be to remove the #! line entirely, since it's not a program that you run, but rather a module that you include from within another script.
  2. The advice to use #!/usr/bin/env is flawed, but unfortunately very widespread. The "correct" action is for the admin user to set the shebang line upon installation, when you know what the path to bash will be, and not to leave it to runtime when PATH may or may not be secure. And definitely not to leave it in place when root is running it on behalf of some other user.

kurahaupo avatar Nov 23 '20 05:11 kurahaupo

See gist 8130030 for a tool that can automate setting the shebang.

kurahaupo avatar Nov 23 '20 05:11 kurahaupo

Thank you for this feedback! "If you learn something new every day, you can teach something new every day". So, should I submit a new one without the shebang?

yorgabr avatar Nov 23 '20 14:11 yorgabr