Make your shebangs portable #!
When making a shell script executable, take advantage of the fact that the env utility is located in /usr/bin on most systems. So, for example, for maximum portability a Python script should start with:
#!/usr/bin/env python
rather than being hard-pathed to wherever Python happens to be on your system. The great thing is that this approach works with virtual environments also, sourcing the python that happens to be appropriate to your currently active virtualenv.
Written by Scott Bradley
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell scripting
Authors
juliomistral
25.98K
jseb
1.003K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#