Gentoo Archives: gentoo-user

From: Alex Schuster <wonko@×××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Running Scripts
Date: Fri, 27 Jul 2007 17:11:11
Message-Id: 200707271904.36992.wonko@wonkology.org
In Reply to: [gentoo-user] Running Scripts by Greg Lindstrom
1 Greg Lindstrom writes:
2
3 > I am programming Python (2.4.1) scripts to run on our Gentoo boxes and
4 > am having a bit of trouble I was hoping you could help me with. My
5 > file, hello.py looks like this:
6 >
7 > #!/usr/bin/python
8 > print 'hello, python'
9 >
10 > I add execute permission to the file and try to run it as follows:
11 >
12 > myprompt $ ./hello.py
13 >
14 > and get
15 >
16 > -bash: ./hello.py: /usr/bin/env: bad interpreter: Permission denied
17
18 is is possible that you saved the text file in DOS format, with CR-LF
19 endings instead of LF only?
20
21 If "od -t x2 hello.py" shows 0a0d sequences, this is the case. You could
22 use dos2unix to convert.
23
24 Just guessing, but I sometimes got similar errors in such cases.
25
26 Alex
27 --
28 gentoo-user@g.o mailing list