LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash script error (https://www.linuxquestions.org/questions/linux-newbie-8/bash-script-error-235693/)

corbis_demon 09-27-2004 04:15 AM

bash script error
 
Hi,
I downloaded a few bash scripts and installed them in /usr/bin.But when I try to invoke them,I get an error saying no such command et. al.Why is it so. I had a perl script when I tried to run it , it threw up the error.What should I do.It would be really daft to ask whether /usr/bin is in the PATH or not.
Please advise.

darthtux 09-27-2004 04:28 AM

Are the permissions on the scripts 755 and did you change their ownership to root?

corbis_demon 09-27-2004 04:32 AM

Well no I haven't changed the permissions, and I as such haven't received any permission denied errors

darthtux 09-27-2004 04:36 AM

Have you tried the full path
/usr/bin/whatever

corbis_demon 09-27-2004 04:40 AM

yes I have.

qwijibow 09-27-2004 04:40 AM

its not a permission denied error in the usual sence...

the permissions alos controll wether or not a file can be executed..

755 makes a file executable to all users, but writable only to the owner.

Code:

chown root /usr/bin/thescript
chmod 755 /usr/bin/thescript


darthtux 09-27-2004 04:48 AM

corbis_demon,

You have to help people help you. We can't see your screen, the commands you type or the output.

mikshaw 09-27-2004 10:41 AM

Were the scripts downloaded using a windows machine? If so, try running them through dos2unix.

Have you tried "sh /usr/bin/thescript"?


All times are GMT -5. The time now is 02:05 PM.