简体   繁体   中英

Remote execution

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!!!

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM