I created a shell script (Script 1) that I need to execute in server A; using Script 1, I need to execute another shell script (Script 2) that resides in Server B.
I am able to do so with the following line:
result=$(ssh ServerB /path/to/script/Script2.sh 2020-01-01 2020-03-12)
The problem is that Script 2, which I do not have edit access, calls another shell script using ./Script3 , I am getting an error stating
"./Script3 : Not found"
I believe the reason behind that is that it is looking for ./Script3 within Server A, rather than looking for it in Server B
How should I execute script 1 to avoid this?
Thanks in advance
/path/to/script