Archive

Posts Tagged ‘Shell’

The wonder of #! (shebang)

January 4, 2008 Leave a comment

Adding this at the beginning of a python script will not work:

#!/usr/bin/env LD_LIBRARY_PATH=mypath python2.5

because shebang only interpret the first space. So it will be interpreted as:

#!/usr/bin/env LD_LIBRARY_PATH="mypath python2.5"

The script will call it self in an infinit loop.

Reference:

Tags: ,