Nothing happens when executing python shebang script in / usr / local / bin /
Nothing happens when executing python shebang script in / usr / local / bin /
Hope someone can help me. So I made a simple python program called test to test the shebang scripts (I used chmod to make it executable):
#!/usr/bin/python
print "hello"
after i copied it to / usr / local / bin / i tried to invoke it by typing my shell: test
but nothing happened ... (there were no errors)
Adrian
source to share
Blender is right: "test" is a bad name for your file. There is already a built-in wrapper called "test". It would be the same if you tried to do a python script called 'ls'. The reason it works when running './test' is because './' tells the shell to make the current directory the first in the executable path. If you rename your python script to 'bangtest' and make sure it has executable permissions (chmod + x bangtest) it will work as you wish.
source to share