473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 1338

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Iván Cabria | last post by:
Hi, I am a new user of python. I ran a python script and I got the following message: sh: test: argument expected I found that this error came from a line in the script:
0
by: Iván Cabria | last post by:
Hi, thanks to Jeff Epler for the answer. I have tried his suggestion and I have added two lines after the first line in the python script: import os os.environ = "/bin/bash"
0
by: Iván Cabria | last post by:
Hi again, I have checked that the shell is the bash shell by running again the script with a print statement. The first four lines are: #!/usr/local/bin/python import os os.environ =...
6
by: Ben Finney | last post by:
Howdy all, Summary: I'm looking for idioms in unit tests for factoring out repetitive iteration over test data. I explain my current practice, and why it's unsatisfactory. When following...
27
by: Josh | last post by:
We have a program written in VB6 (over 100,000 lines of code and 230 UI screens) that we want to get out of VB and into a better language. The program is over 10 years old and has already been...
1
by: Timbo | last post by:
Hi all, This is my first message here so i'll try and include all the information that will help you help me out, if possible. Basically I am using C# in ASP.NET 2.0 and have a Repeater...
2
by: Nathan Sokalski | last post by:
I have a DataList in which the ItemTemplate contains two Button controls that use EventBubbling. When I click either of them I receive the following error: Server Error in '/' Application....
176
by: nw | last post by:
Hi, I previously asked for suggestions on teaching testing in C++. Based on some of the replies I received I decided that best way to proceed would be to teach the students how they might write...
3
by: JanW | last post by:
Somewhat a C++ beginner, I'm trying to make a general test function that could test unary operators (or methods) of an object of any class. Arguments are a member-pointer to the function, a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.