LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   executing Bash Scripts (http://www.linuxquestions.org/questions/linux-general-1/executing-bash-scripts-536615/)

c4nk 03-11-2007 03:46 PM

executing Bash Scripts
 
I wrote a simple bash script but i can't run it, i named it mmm.sh
i typed ls to make sure am in right directory and i tried ./mmm and ./mmm.sh both tell me file not found.

antis 03-11-2007 04:00 PM

Quote:

Originally Posted by c4nk
I wrote a simple bash script but i can't run it, i named it mmm.sh
i typed ls to make sure am in right directory and i tried ./mmm and ./mmm.sh both tell me file not found.

Did you make the scrip executable? If not, type "chmod +x mmm.sh". Then you should be able to run it by doing "./mmm.sh"

c4nk 03-11-2007 04:10 PM

I added 'chmod +x mmm.sh' at the end of the bash script but now when i run it './mmm.sh' it tells me permision denied

jschiwal 03-11-2007 04:52 PM

No, run "chmod +x mmm.sh" in the console, don't add it to the script. This will make the mmm.sh script executable.


All times are GMT -5. The time now is 01:00 AM.