sh: test: argument expected and /usr/bin/env

I

Iván Cabria

Hi,

in the help page of env (man env) we can find:
...
...
/usr/bin/env
If env executes commands with arguments, it uses the default
shell /usr/bin/sh (see sh(1)).
...
...

The first line of the python script I am running is:
#!/usr/bin/env python
and hence, is using the shell sh...

To change this I have written in the first line of the script:
#!/usr/bin/env SHELL=/bin/bash python

I have run the script and there has not been any kind of output,
after running a long time. The script is running, there are no error messages
of the type 'sh: test: argument expected', but there is no output. It seems
to me that Python is not running the script. In fact, I have written a
print statement in the second line, and the script has not printed out
the message.



Without SHELL=/bin/bash in the first line, Python is running the script: I
have written print statements in the second line of the script and also before
and after the line where the error message comes from, and the script has
printed out all the messages.



Iván
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,272
Latest member
MaricruzDu

Latest Threads

Top