Excecute command activity
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 6
- Joined: Thu Jul 13, 2006 4:28 am
Excecute command activity
Hi Dsxians,
Could u please let me know the syntax of calling shell and perl scripts through excecute command activity stage.I have been trying like
sh scriptname and perl scriptname,in command tab.i have no parameters.It is saying command not found.Please help me out in this.
Thanks
satheesh
Could u please let me know the syntax of calling shell and perl scripts through excecute command activity stage.I have been trying like
sh scriptname and perl scriptname,in command tab.i have no parameters.It is saying command not found.Please help me out in this.
Thanks
satheesh
Satheesh Y
Hi you havent mentioned whether you are using the command stage in a job or whether you are using the execute command activity of the job sequencer. If you mean the latter , maybe you can try something like
". /usr/xyz/scripts/commandtoexec.sh" or
sh -c ". /usr/xyz/scripts/commandtoexec.sh"
If A parameter is reqd., you can use sh-c as the command, and can use ". /usr/xyz/scripts/commandtoexec.sh"
as a parameter
Try it out( with and without the preceeding dot (".") and something has to work if it works from the shell invocation)
". /usr/xyz/scripts/commandtoexec.sh" or
sh -c ". /usr/xyz/scripts/commandtoexec.sh"
If A parameter is reqd., you can use sh-c as the command, and can use ". /usr/xyz/scripts/commandtoexec.sh"
as a parameter
Try it out( with and without the preceeding dot (".") and something has to work if it works from the shell invocation)
-
- Participant
- Posts: 6
- Joined: Thu Jul 13, 2006 4:28 am
Hi ramesh,
Thanks for ur reply.I am using excecute command activity stage in sequencer.Will ur previous commands work here also.do u know how to call the perl scripts.
./dws_edw_javaread.pl is enough or should i use perl dws_edw_javaread.pl, the later is not working for me..Please have ur suggestions.
Thanx
sherin
Thanks for ur reply.I am using excecute command activity stage in sequencer.Will ur previous commands work here also.do u know how to call the perl scripts.
./dws_edw_javaread.pl is enough or should i use perl dws_edw_javaread.pl, the later is not working for me..Please have ur suggestions.
Thanx
sherin
Satheesh Y
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 6
- Joined: Thu Jul 13, 2006 4:28 am
-
- Participant
- Posts: 6
- Joined: Thu Jul 13, 2006 4:28 am
well im calling a perl script in my job, but giving the absolute path. Im also sourcing the environment before running that script( using a shell file full of 'export ENV=$VALUE' commands).
Im NOT using perl - blah blah anywhere. INstead i have a shell script that will invoke the perl script and im executing this shell script.
Thanks
Ramesh
Im NOT using perl - blah blah anywhere. INstead i have a shell script that will invoke the perl script and im executing this shell script.
Thanks
Ramesh
I did another test for passing parameters for Executecommand activity in Version 7.0 Server edition, as once said by Craig, the value is been passed correctly without any warning or error, but the command is not executed correctly.
But the hardcoded value gives the desired output.
But the hardcoded value gives the desired output.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: Excecute command activity
Make sure the $PATH environment variable of your project includes the directories your commands are in. Or add the $PATH environment variable to your job parameters tab and add the directories you need. You can also source a file that sets environment variables (including PATH) prior to executing your command, likeSatheesh_Yama wrote:Hi Dsxians,
Could u please let me know the syntax of calling shell and perl scripts through excecute command activity stage.I have been trying like
sh scriptname and perl scriptname,in command tab.i have no parameters.It is saying command not found.Please help me out in this.
Thanks
satheesh
Code: Select all
. /home/`whoami`/my_ds_shell_env;perlscript #arg#