0

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

C0de_Hard
  • 72
  • 1
  • 9

1 Answers1

0

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

ckhan
  • 4,771
  • 24
  • 26
  • Got the issue resolved!! I forgot to export few environment variables that I have used in **sever A**. @ckhan: Thanks!!! – C0de_Hard Jul 05 '12 at 14:55