One Star

how to run job with tsystem component with command line arguments

hi,
I have one script file name "test.sh", with 2 command line args as
. /home/revanth/test.sh revanth raja
i gave in tsystem component
new String[]{"/bin/bash","-c",". /home/revanth/test.sh", context.arg1,context.arg2}
given argument values revanth and raja through contexts.
but when run this job in unix it won't give any result (it simply running for a long time more than 20 mins and so i have killed it)
how to run this job
1 REPLY
One Star

Re: how to run job with tsystem component with command line arguments

Hi
If you want to pass context_param into sh script, the String[] should be like this.
new String[]{"/bin/bash","-c","/home/revanth/test.sh --context_param new1=revanth --context_param new2=raja"}
or
new String[]{"/bin/bash","-c","/home/revanth/test.sh"+context.new1+context.new2}
Regards,
Pedro