Python and Red Hat Linux 6.0

Brian Raynes brianr at dnr.state.ak.us
Thu Aug 5 14:32:03 EDT 1999


Rob wrote:
> 
> When programming in Perl or Python, I am using a header like the
> following on an executable file to cause the shell (bash or csh) to run
> the scripts as Perl/Python files:
> #!/usr/bin/perl   for Perl   and #!/usr/bin/python   for Python. I've
> checked and the compilers are located in the appropriate directories. I
> keep getting this when I run scripts:
> bash: <script name>: command not found. Does Linux support the '#!'
> notation in the file header, or do I always have to run the scripts by
> explicitly typing in 'perl' or 'python' before the script name?


I also recently had a similar problem, I had created the
files using Wordpad and saved them to the Linux server.  I
thought I was using a UNIX-safe text format, but I later
discovered it was in DOS text format.  Just another idea.




More information about the Python-list mailing list