I am reading O'Reilly Learning Python (4th edition). There is a paragraph called Unix Executable Scripts (#!) (page 46).
The example given is the following:
`Use your text editor again to create a file of Python code called brian:
#!/usr/local/bin/python
print('The Bright Side ' + 'of Life...')
` Like in the example, I save this script in a file named 'brian' (no .py, as it is not required).
I then give the file the privileges chmod +x brian
It is then said that I can 'run it from the operating system shell as though it were a binary program:
% brian
The Bright Side of Life...
'
However, when I try from my command window to call "brian", I get the following error:
bash: brian: command not found
But python brian gives me the correct result.
Why calling 'brian' like in the example doesn't work for me?