• bash script

    From Rick Smith@1:105/10.1 to All on Sat Jun 19 11:25:46 2021
    Greetings All!


    Not sure if this is where I would ask this question or not? I am trying to make bash script to combine a couple of other scripts and I had a couple of questions. So If I make a script that performs something and then it calls say another script, would the first script then pause until the called side script completes? If not is there a way to make it wait to move forward until the other one completes? I hope I am describing this well for you.


    ----
    Regards,


    Rick Smith (Nitro)

    ... Max takes your BBSing to the Maximum and further!
    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ----> Abacus Sysop Point --->>>>bbs.abon.us:2323 (1:105/10.1)
  • From Daniel Path@2:371/52 to Rick Smith on Sat Jun 19 21:41:01 2021
    Hello Rick.

    19 Jun 21 11:25, you wrote to All:

    Greetings All!


    Not sure if this is where I would ask this question or not? I am
    trying to make bash script to combine a couple of other scripts and I
    had a couple of questions. So If I make a script that performs
    something and then it calls say another script, would the first script then pause until the called side script completes? If not is there a
    way to make it wait to move forward until the other one completes? I
    hope I am describing this well for you.

    it will 'wait'.

    for example the two scripts:

    ==== a.sh =====
    #!/bin/bash
    echo "a"
    ./b.sh
    echo "c"
    ===============
    ==== b.sh =====
    #!/bin/bash
    echo "this is b"
    ===============

    danielp@getfunky:~/test$ ./a.sh
    a
    this is b
    c



    i hope this was your question :)

    Daniel

    ... BBS: Uptime is 01d 00h 08m 13s (BT-Uptime/OS2, V1.5)
    --- GoldED+/EMX 1.1.4.7
    * Origin: Roon's BBS - Budapest, HUNGARY (2:371/52)
  • From Alan Ianson@1:153/757.3 to Rick Smith on Sat Jun 19 14:51:26 2021
    Greetings All!


    Not sure if this is where I would ask this question or not?

    This is as good a place as any. There is also the BASH and TUXPOWER areas although they are low traffic.

    I am trying to make bash script to combine a couple of other scripts and I had a couple of questions. So If I make a script that performs something and then it calls another script, would the first script then pause until the called side script completes?

    Something like the ability to "call" another bat file in DOS and then the calling bat file continues with what it was doing?

    I am sure there is a way to do that in bash also but even after all these years my bash skills are less than what they could/should be.

    If not is there a way to make it wait to move forward until the
    other one completes? I hope I am describing this well for you.

    I sometimes do a test for certain files and if found the script will do that with an "if", like this..

    if [ -f /usr/local/fido/dotic.now ]; then
    rm /usr/local/fido/dotic.now
    /usr/local/bin/htick toss
    /usr/local/bin/mfreq-index
    fi

    Then the script carries on with what it is doing.

    --- BBBS/Li6 v4.10 Toy-5
    * Origin: The Rusty MailBox - Penticton, BC Canada (1:153/757.3)