I want to make a script for a workspace configuration, and i need it to open a ssh terminal, and inside it i need to throw a "bash" command (because default is tcsh) and over bash, throw another commands, and i want the terminal to stay in the last state.
I have this in the script:
...
cd xxx/xxx
bash
source setup.sh
...
exit 0
and when the script is over, my terminal stays in bash, but didn't executed the next steps.
How can i do this? anyone have and idea? Thanks in advanced.
Now i'm doing this:
ssh -X URL << '___'
cd xxx/xxx
bash -c "source setup.sh"
___
If i launch the bash -c only, inside the ssh URL, it works, but if i do it complete, it ends the execution and drops me outside the ssh URL. If i do bash -i at the end it says "bash: no job control in this shell" and dumps me out. the -exec option does the same.
Anybody sees what i'm doing wrong?