How to execute bash script in same shell

后端 未结 1 557
没有蜡笔的小新
没有蜡笔的小新 2021-01-12 17:51

I have a bash script which is calling three different commands and that execution must happen in one shell. I got it by adding && after each command like as follows-

相关标签:
1条回答
  • 2021-01-12 18:28

    First, you will need to save save the command in a scriptfile, for example Myscript.sh.

    Second, you can execute the script file to run your commands simultaneously using

    . ./Myscript.sh
    

    The first . stands for current shell and the second . for current directory.

    0 讨论(0)
提交回复
热议问题