Last Updated: February 25, 2016
·
619
· Chao Yang

Use /usr/bin/env

In any (shell, perl, python, etc... ) script, it starts with a 'she-bang' line. Usually, we use something like this:

#!/bin/bash                      # for shell script
#!/usr/bin/python            # for python

We can use /usr/bin/env instead! This will give you more flexible. Just like this:

#!/usr/bin/env python