LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-06-2008, 11:55 AM   #1
owenm
LQ Newbie
 
Registered: Nov 2008
Location: Ireland
Distribution: CentOS
Posts: 13

Rep: Reputation: 0
python script wont start - bash: myCommand : command not found


Hi all, first post, hope someone can help.

I have inherited a mail server running scalix 10.0.1 on Red hat enterprise linux v4 (x86) u3 and need to run a utility in the administrators kit called 'sxaa' but when I type sxaa at the prompt i get

bash: sxaa: command not found

sxaa is a valid command for the utility because the readme file says so.

I tried sh sxaa and got:

sxaa: line 4:
: sxaa,v 1.6 2006/03/29 02:32:54 dkelly Exp $
: No such file or directory
sxaa: line 6: import: command not found
sxaa: line 7: import: command not found
sxaa: line 8: import: command not found
sxaa: line 9: import: command not found
sxaa: line 10: from: command not found
sxaa: line 15: gDQuote: command not found
sxaa: line 16: gDebugMode: command not found
sxaa: line 17: syntax error near unexpected token `('
sxaa: line 17: `gB = ("s", "")'
[root@lmkzr admin_resource_kit]#


It's not a path (?) issue because I am trying to run it from the directory it is in.

Do I need to install a python command interpreter or something? ls -al gives -rwxr-xr-x. does this not indicate the file is executable by all users?

I'm a bit new to linux at command prompt but can get around, I have never installed anything though. The system does have a gui (X) desktop as well.

Any pointers would be appreciated.

Tks,
Owen.
 
Old 11-06-2008, 12:37 PM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
It is indeed a path issue in the first instance - it's not in the path so you cannot just type its name, you need to specify you're running it from current directory with './':

./sxaa

In the second instance when you do 'sh sxaa' you are telling a shell (in your case Bash) to execute a Python utility - not much surprise that it fails

Do:

python sxaa

and see if it works.
 
Old 11-06-2008, 12:50 PM   #3
owenm
LQ Newbie
 
Registered: Nov 2008
Location: Ireland
Distribution: CentOS
Posts: 13

Original Poster
Rep: Reputation: 0
Much appreciated. Working fine.

Tks,
Owen.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash script says command not found - why? RavenLX Ubuntu 3 08-03-2007 03:19 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-28-2006 12:57 AM
Trying to write a bash script -- :Command not found? bpottle Linux - Software 7 06-10-2006 07:11 PM
bash syntax when envoking tar command in python script tangle Programming 4 02-04-2006 04:22 PM
Bash Script; command not found twintornado Programming 2 06-01-2005 10:59 AM


All times are GMT -5. The time now is 07:42 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration