I have 4 shell scripts and I want to run them in a sequencing way:
script1 -> script2 -> script3 ->script4
in a local machine can I ensure this by make the scripts executable and creating a new shell script like this:
#!/bin/bash
. script1.sh
. script2.sh
. script3.sh
. script4.sh
and if one of the scripts is in a remote machine, (for example script2.sh) how can I:
- run the shell script remotely
- ensure the sequencing.
Note : all of the scripts have an infinite loop.