471,119 Members | 1,205 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,119 software developers and data experts.

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

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
Jul 18 '05 #1
0 1284

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Iván Cabria | last post: by
reply views Thread by Iván Cabria | last post: by
reply views Thread by Iván Cabria | last post: by
6 posts views Thread by Ben Finney | last post: by
27 posts views Thread by Josh | last post: by
2 posts views Thread by Nathan Sokalski | last post: by
176 posts views Thread by nw | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.