Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-06-2008, 10:55 AM   #1
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.

Old 11-06-2008, 11:37 AM   #2
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 './':


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


python sxaa

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

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



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 02:19 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
Trying to write a bash script -- :Command not found? bpottle Linux - Software 7 06-10-2006 06:11 PM
bash syntax when envoking tar command in python script tangle Programming 4 02-04-2006 03:22 PM
Bash Script; command not found twintornado Programming 2 06-01-2005 09:59 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:52 PM.

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