I'm trying to run a python script with several parameters, the tab warnings,optimize and verbose parameters, -t, -O and -v respectively.
#!/usr/bin/python -t -O -v
This is the error that I get when I try to run it this way, ./script.py in the terminal.
Unknown option: - usage: /usr/bin/python [option] ... [-c cmd | -m mod | file | -] [arg] ... Try python -h' for more information.
The script runs well when I have a maximum of one parameter in the shebang. Is it wrong to pass more than one parameter in a python shebang?
Running the script as python -O -t -v script.py at the terminal works.
I'm guessing this is a python issue because I have a perl script that has the following shebang #!/usr/bin/perl -w -t and it runs okay.
The only workaround I came up with was creating a python_runner.sh script to invoked the python interpreter with the three parameters:
#!/bin/sh python -O -t -v $1
#!line.