Remote execution

349 Views Asked by At

I have been working on rexec for a few days!!

So the task is like this. I have server A and server B. I want to run a shell script on server B which is triggered from server A. The script that I use will be like

From server A
rexec serverB script.sh argument

Script.sh in server B
f1=$1
echo "unload to test.unl select * from table where key in ($first)"|dbaccess DB
cat test.unl

when I run thescript.sh in server B it has no problem at all.

When the same is run from server A, it says dbaccess not found. Please help!!!

1

There are 1 best solutions below

1
On

Probably a PATH issue. Type which dbaccess on server B, and use that complete path in your script.