How to run multiple Unix commands in one time?

前端 未结 8 1238
一向
一向 2021-02-06 02:04

I\'m still new to Unix. Is it possible to run multiple commands of Unix in one time? Such as write all those commands that I want to run in a file, then after I call that file,

相关标签:
8条回答
  • 2021-02-06 02:46
    echo 'hello' && echo 'world'
    

    Just separate your commands with &&

    0 讨论(0)
  • 2021-02-06 02:52

    Yep, just put all your commands in one file and then

    bash filename
    

    This will run the commands in sequence. If you want them all to run in parallel (i.e. don't wait for commands to finish) then add an & to the end of each line in the file

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