Problem Running Script
Problem Running Script
(OP)
I'm on Solaris 10
I've put a perl script in a directory but when I try to run it from the directory I get an error message 'Command not found.'
If I prefix the command with ./ it runs. How do I get it to run without the prefix?
Thanks,
Dave
I've put a perl script in a directory but when I try to run it from the directory I get an error message 'Command not found.'
If I prefix the command with ./ it runs. How do I get it to run without the prefix?
Thanks,
Dave
RE: Problem Running Script
The internet - allowing those who don't know what they're talking about to have their say.
RE: Problem Running Script
RE: Problem Running Script
The internet - allowing those who don't know what they're talking about to have their say.
RE: Problem Running Script
No idea what shebang perl is! I checked for the perl location with find . -name perl -print and found it in many locations. I plumped for /usr/bin/perl
I wouldn't have thought the perl part is the problem as the error message seems to indicate the script can't be found.
RE: Problem Running Script
export $PATH:/path/to/your/directoy
Sorry - the shebang is usually the first line of a script, telling where to find the shell/program used to run the script - like:
#!/usr/local/bin/perl
for example. Hopefully someone else will be along with some other ideas for you.
The internet - allowing those who don't know what they're talking about to have their say.
RE: Problem Running Script
Thanks for your help - at least I've learned something new today: shebang (sounds like an illegal Irish drinking den).
Cheers,
Dave
RE: Problem Running Script
export PATH=$PATH:/path/to/your/directory
The internet - allowing those who don't know what they're talking about to have their say.
RE: Problem Running Script
Cracked it! I logged out and logged back in again. The PATH looked ok but I'd been shelling out and back in during the course of my last session so I guess things got screwed up.
Thanks again,
Dave
RE: Problem Running Script
The internet - allowing those who don't know what they're talking about to have their say.