[techtalk] bash exec persistent confusion...

Paul Hardacre paul.hardacre at tigercomms.com
Tue Feb 27 13:47:26 EST 2001


At 12:15 27/02/2001, Walt wrote:
>I was (am) having trouble with a script on one
>of my web pages and so at the bash prompt
>I typed: exec counter.cgi
>
>Even though the file is clearly there and I can
>edit it, etc, bash responds:
>
>bash: /var/www/cgi-bin/counter.cgi: no such file or directory
>
>Other scripts in the directory work fine! Just
>not this one... Any ideas?

This sounds like one of my classic errors of the past.. :)

The problem is not that the script can't be found, it's actually related to 
the first line of the script itself.

If you edit the script you'll find the first line will be:

#! /usr/bin/perl

Or something along those lines. This is the bit that's causing the error. 
It's what is actually being used to execute the script.

You just need to make sure it has the correct location of the script 
"interpreter" in that line.

Hope that helps,

Paul
(really hoping this will post from work)
-------------- next part --------------

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.231 / Virus Database: 112 - Release Date: 12/02/2001


More information about the Techtalk mailing list