bash: start multiple chained commands in background

前端 未结 15 917
生来不讨喜
生来不讨喜 2020-12-07 22:47

I\'m trying to run some commands in paralel, in background, using bash. Here\'s what I\'m trying to do:

forloop {
  //this part is actually written in perl
          


        
15条回答
  •  失恋的感觉
    2020-12-07 23:24

    Try to put commands in curly braces with &s, like this:

    {command1 & ; command2 & ; command3 & ; }
    

    This does not create a sub-shell, but executes the group of commands in the background.

    HTH

提交回复
热议问题