Different behaviour of script locally and over ssh
- by neorg
I have a script on a server-A
Script-A
#!/bin/bash -l
echo "script-A.sh" | change-environment.sh
When I ssh onto server-A and execute it, it works fine.
However, when I
ssh user@server-A ./script-A.sh
Script-A executes, but throws an undefined variable error in change-environment.sh.
change-environment.sh runs in the c shell(I have no…