You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "wasphin (via GitHub)" <gi...@apache.org> on 2023/02/24 06:25:14 UTC

Re: [I] Bash shebangs are wrong: they should be #!/usr/bin/env bash (brpc)

wasphin commented on issue #2070:
URL: https://github.com/apache/brpc/issues/2070#issuecomment-1442864402

   After some googling, it seems not all OS uses `/bin/bash` as the default bash location. e.g. FreeBSD use `/usr/local/bin/bash`?
   
   And, if I understand right, there's no standard POSIX location for `env`, either.
   
   `#!/usr/bin/env bash` may be more portable, but that doesn't mean `#!/bin/bash` is wrong.
   
   
   https://stackoverflow.com/questions/10376206/what-is-the-preferred-bash-shebang
   https://stackoverflow.com/questions/21612980/why-is-usr-bin-env-bash-superior-to-bin-bash
   https://en.wikipedia.org/w/index.php?title=Shebang_(Unix)&oldid=878552871#Portability


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org