Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Bash from $PATH #1

Merged
merged 1 commit into from
Sep 17, 2015
Merged

Use Bash from $PATH #1

merged 1 commit into from
Sep 17, 2015

Conversation

ggustafsson
Copy link
Contributor

If you use "#!/usr/bin/env bash" instead then the PATH variable specifies where to look for "bash" first. Basically this makes it really easy for users to override the system bash version with a user installed bash version, for example through Homebrew.

Example:

#!/usr/bin/env bash
+
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
=
Execution of /usr/local/bin/bash instead of /bin/bash because it is specified first.

If you use "#!/usr/bin/env bash" instead then the PATH variable specifies where to look for "bash" first. Basically this makes it really easy for users to override the system bash version with a user installed bash version, for example through Homebrew.

Example:

#!/usr/bin/env bash
+
PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
=
Execution of /usr/local/bin/bash instead of /bin/bash because it is specified first.
@posva
Copy link
Owner

posva commented Sep 17, 2015

Thanks for that @ggustafsson 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants