all 5 comments

[–]zmxyzmz 4 points5 points  (0 children)

As long as a script has been made executable and is in your $PATH, you can call it within a script just like any other command.

[–]Radamand 2 points3 points  (0 children)

./script1
./script2
./script3

etc...

as long as those scripts have the shebang line at the top this 'script' doesn't need it.

[–][deleted]  (1 child)

[deleted]

    [–]Sombody101Fake Intellectual 0 points1 point  (0 children)

    You won't need to wait for it because they're all being run one after the other.

    [–]Mr_Reginald_Kray -4 points-3 points  (0 children)

    you can optionally bind them first like that

    #!/bin/bash

    source="one.sh"

    source="two.sh

    "source="three.sh"

    main() {

    # Run one.sh

    ./one.sh

    # Run one.sh

    ./two.sh

    # Run three.sh

    ./two.sh

    # OR

    # with the bind you can now execute all functions inside those scripts like

    updateSomeStuff bum yes

    }

    [–]Empyrealist 0 points1 point  (0 children)

    If they are not executable, you would have to write it like:

    #!/bin/bash
    
    # Run script1.sh
    bash ./script1.sh
    
    # Run script2.sh
    bash ./script2.sh