LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-11-2007, 03:46 PM   #1
c4nk
Member
 
Registered: Oct 2006
Distribution: CentOS 4 :) and Win Xp ;(
Posts: 32

Rep: Reputation: 15
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.
 
Old 03-11-2007, 04:00 PM   #2
antis
Member
 
Registered: Nov 2004
Location: sweden
Distribution: Arch
Posts: 67

Rep: Reputation: 15
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"
 
Old 03-11-2007, 04:10 PM   #3
c4nk
Member
 
Registered: Oct 2006
Distribution: CentOS 4 :) and Win Xp ;(
Posts: 32

Original Poster
Rep: Reputation: 15
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
 
Old 03-11-2007, 04:52 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

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


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CGI Scripts not executing Mr_Oz Linux - Enterprise 7 04-18-2006 03:21 PM
CGI Scripts not executing, pls help john_d13 Linux - General 3 12-22-2004 02:05 PM
Executing scripts upon login jungatheart Linux - Newbie 3 04-19-2004 06:06 PM
Executing Shell Scripts? l0f33t Linux - General 7 08-17-2003 03:36 PM
Executing shell scripts justinv Linux - General 6 01-26-2003 07:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration