What's the purpose of having âenv [shell]â as an interpreter? [duplicate]
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This question already has an answer here:
Why is it better to use â#!/usr/bin/env NAMEâ instead of â#!/path/to/NAMEâ as my shebang?
9 answers
I already stumbled over #!/usr/bin/env bash
on numerous occasions and never questioned it. Now, I'm wondering what the purpose of wrapping the shell interpreter in an env
command, i.e. why not just write #!/bin/bash
, #!/bin/sh
or whatever?
shell-script shell environment-variables interpreter
marked as duplicate by sebasth, Ipor Sircer, Thomas, Thomas Dickey, Community⦠yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
0
down vote
favorite
This question already has an answer here:
Why is it better to use â#!/usr/bin/env NAMEâ instead of â#!/path/to/NAMEâ as my shebang?
9 answers
I already stumbled over #!/usr/bin/env bash
on numerous occasions and never questioned it. Now, I'm wondering what the purpose of wrapping the shell interpreter in an env
command, i.e. why not just write #!/bin/bash
, #!/bin/sh
or whatever?
shell-script shell environment-variables interpreter
marked as duplicate by sebasth, Ipor Sircer, Thomas, Thomas Dickey, Community⦠yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This question already has an answer here:
Why is it better to use â#!/usr/bin/env NAMEâ instead of â#!/path/to/NAMEâ as my shebang?
9 answers
I already stumbled over #!/usr/bin/env bash
on numerous occasions and never questioned it. Now, I'm wondering what the purpose of wrapping the shell interpreter in an env
command, i.e. why not just write #!/bin/bash
, #!/bin/sh
or whatever?
shell-script shell environment-variables interpreter
This question already has an answer here:
Why is it better to use â#!/usr/bin/env NAMEâ instead of â#!/path/to/NAMEâ as my shebang?
9 answers
I already stumbled over #!/usr/bin/env bash
on numerous occasions and never questioned it. Now, I'm wondering what the purpose of wrapping the shell interpreter in an env
command, i.e. why not just write #!/bin/bash
, #!/bin/sh
or whatever?
This question already has an answer here:
Why is it better to use â#!/usr/bin/env NAMEâ instead of â#!/path/to/NAMEâ as my shebang?
9 answers
shell-script shell environment-variables interpreter
shell-script shell environment-variables interpreter
asked yesterday
Karl Richter
7031822
7031822
marked as duplicate by sebasth, Ipor Sircer, Thomas, Thomas Dickey, Community⦠yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by sebasth, Ipor Sircer, Thomas, Thomas Dickey, Community⦠yesterday
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
I think this became popular because of python.
With this you can do
#!/usr/bin/env python3
for example and be quite sure env
will find the right version and location for the executable.
Then this migrated to other shells because it seems like a good practice to always do even if you know where that particular shell is.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I think this became popular because of python.
With this you can do
#!/usr/bin/env python3
for example and be quite sure env
will find the right version and location for the executable.
Then this migrated to other shells because it seems like a good practice to always do even if you know where that particular shell is.
add a comment |Â
up vote
0
down vote
I think this became popular because of python.
With this you can do
#!/usr/bin/env python3
for example and be quite sure env
will find the right version and location for the executable.
Then this migrated to other shells because it seems like a good practice to always do even if you know where that particular shell is.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I think this became popular because of python.
With this you can do
#!/usr/bin/env python3
for example and be quite sure env
will find the right version and location for the executable.
Then this migrated to other shells because it seems like a good practice to always do even if you know where that particular shell is.
I think this became popular because of python.
With this you can do
#!/usr/bin/env python3
for example and be quite sure env
will find the right version and location for the executable.
Then this migrated to other shells because it seems like a good practice to always do even if you know where that particular shell is.
answered yesterday
mikst
967
967
add a comment |Â
add a comment |Â