using Command Line Adapter cannot run shell scripts
One answer
Where your command line adapter is running? What is the command you are running, make sure the command specified is valid on the machine where adapter is running.
I am assuming " Command not found " is showing in Execution Result.
Comments
Hi Pramod, I am trying to run the following shell script:
!/bin/bash
cd /dir
for i in ls
do
echo $i;
done
And the CLA is running is Linux box where I am invoking this script. Yes in execution results it says "ls : command not not found" this message attached stdout.
Any suggestions ?
How your command line remote script looks in RQM? Is it ference to a shell script file or the command directly is given in remote script in RQM. Try with creating a file and in remote script just specify the name of the file and see if that works.
Hello Pramod, I have given the name of the .sh file..Inside this .sh file I am running 'ls' command.. and in the Command line I have given path of the .sh file where it is created !.. any more suggestions?
Hello Chandra, When logged in as the user who started the command line adapter, can you run your .sh script successfully? ie. outside of RQM.
You might also try adding the line 'set -x' to the top of your .sh script and then run it again under RQM. This will send a list of the commands executed to the stderr stream.
Another thing to check is whether you're able to successfully run some basic linux command like 'who' or 'date'. Create a RQM command line test script where the command to run is /usr/bin/who or /bin/date and see if that runs successfully.
Thanks Neal.. I am able to run the sample command which you mentioned "who".. If I just mention "who" it does not work but with "/usr/bin/who" it works. So does it mean that, we need to follow this convention for running all other scripts?
Hi Thomos, I am executing following python script:
! /usr/local python
currency = u"€" print ord(currency)
I get error and the message in std.err is: Cannot run program "/Scripts/myscript.py": error=13, Permission denied any siggestions?