How to run multiple commands in parallel and see output from both?












2














Specifically, I want to run



lsyncd lsyncd.lua


And



webpack --progress --color -w


Which are both long-running processes. I want to see the output from both, interlaced in my terminal. It doesn't matter if the results are a bit jumbled, I just like to see that they're doing what they're supposed to.



Also, I want it to kill both processes when I press Ctrl+C.





I'm trying



parallel ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


which seems to be working, but I can't see any output even though when I run those commands individually, they output something.










share|improve this question
























  • Possible duplicate Running programs in the background from terminal; you may also want to look into Bash's job control.
    – David Foerster
    Dec 17 '15 at 20:51










  • @DavidFoerster Your first link links back here.
    – mpen
    Dec 17 '15 at 21:07










  • @DavidFoerster Also, if you're talking about this question that's the opposite of what I want to do. Pressing Ctrl+C or closing the terminal should kill the jobs. I don't want to background them.
    – mpen
    Dec 17 '15 at 21:08
















2














Specifically, I want to run



lsyncd lsyncd.lua


And



webpack --progress --color -w


Which are both long-running processes. I want to see the output from both, interlaced in my terminal. It doesn't matter if the results are a bit jumbled, I just like to see that they're doing what they're supposed to.



Also, I want it to kill both processes when I press Ctrl+C.





I'm trying



parallel ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


which seems to be working, but I can't see any output even though when I run those commands individually, they output something.










share|improve this question
























  • Possible duplicate Running programs in the background from terminal; you may also want to look into Bash's job control.
    – David Foerster
    Dec 17 '15 at 20:51










  • @DavidFoerster Your first link links back here.
    – mpen
    Dec 17 '15 at 21:07










  • @DavidFoerster Also, if you're talking about this question that's the opposite of what I want to do. Pressing Ctrl+C or closing the terminal should kill the jobs. I don't want to background them.
    – mpen
    Dec 17 '15 at 21:08














2












2








2







Specifically, I want to run



lsyncd lsyncd.lua


And



webpack --progress --color -w


Which are both long-running processes. I want to see the output from both, interlaced in my terminal. It doesn't matter if the results are a bit jumbled, I just like to see that they're doing what they're supposed to.



Also, I want it to kill both processes when I press Ctrl+C.





I'm trying



parallel ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


which seems to be working, but I can't see any output even though when I run those commands individually, they output something.










share|improve this question















Specifically, I want to run



lsyncd lsyncd.lua


And



webpack --progress --color -w


Which are both long-running processes. I want to see the output from both, interlaced in my terminal. It doesn't matter if the results are a bit jumbled, I just like to see that they're doing what they're supposed to.



Also, I want it to kill both processes when I press Ctrl+C.





I'm trying



parallel ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


which seems to be working, but I can't see any output even though when I run those commands individually, they output something.







command-line






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 17 '15 at 18:48

























asked Dec 17 '15 at 18:27









mpen

80321122




80321122












  • Possible duplicate Running programs in the background from terminal; you may also want to look into Bash's job control.
    – David Foerster
    Dec 17 '15 at 20:51










  • @DavidFoerster Your first link links back here.
    – mpen
    Dec 17 '15 at 21:07










  • @DavidFoerster Also, if you're talking about this question that's the opposite of what I want to do. Pressing Ctrl+C or closing the terminal should kill the jobs. I don't want to background them.
    – mpen
    Dec 17 '15 at 21:08


















  • Possible duplicate Running programs in the background from terminal; you may also want to look into Bash's job control.
    – David Foerster
    Dec 17 '15 at 20:51










  • @DavidFoerster Your first link links back here.
    – mpen
    Dec 17 '15 at 21:07










  • @DavidFoerster Also, if you're talking about this question that's the opposite of what I want to do. Pressing Ctrl+C or closing the terminal should kill the jobs. I don't want to background them.
    – mpen
    Dec 17 '15 at 21:08
















Possible duplicate Running programs in the background from terminal; you may also want to look into Bash's job control.
– David Foerster
Dec 17 '15 at 20:51




Possible duplicate Running programs in the background from terminal; you may also want to look into Bash's job control.
– David Foerster
Dec 17 '15 at 20:51












@DavidFoerster Your first link links back here.
– mpen
Dec 17 '15 at 21:07




@DavidFoerster Your first link links back here.
– mpen
Dec 17 '15 at 21:07












@DavidFoerster Also, if you're talking about this question that's the opposite of what I want to do. Pressing Ctrl+C or closing the terminal should kill the jobs. I don't want to background them.
– mpen
Dec 17 '15 at 21:08




@DavidFoerster Also, if you're talking about this question that's the opposite of what I want to do. Pressing Ctrl+C or closing the terminal should kill the jobs. I don't want to background them.
– mpen
Dec 17 '15 at 21:08










4 Answers
4






active

oldest

votes


















1














Using parallel (in the moreutils package):



parallel -j 2 -- 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


Since the parallel process runs in the foreground, hitting CTRL+C will terminate all the processes running on top of it at once.





  • -j: Use to limit the number of jobs that are run at the same time;


  • --: separates the options from the commands.


% parallel -j 2 -- 'while true; do echo foo; sleep 1; done' 'while true; do echo bar; sleep 1; done'
bar
foo
bar
foo
bar
foo
^C
%





share|improve this answer























  • Aha. That parallel seems to be different from than the parallel package (GNU?). This one seems to work! The other one just kept saying "parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.".
    – mpen
    Dec 18 '15 at 16:52



















2














GNU Parallel defaults to postponing output until the job is finished. You can instead ask it to print output as soon there is a full line.



parallel  --lb ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


It avoids half-line mixing of the output:



parallel -j0 --lb 'echo {};echo -n {};sleep {};echo {}' ::: 1 3 2 4


Spend 20 minutes reading chapter 1+2 of GNU Parallel 2018 (online, printed). Your command line will love you for it.






share|improve this answer































    1














    You have more options. Run the first command and press Ctrl-Z. This puts the command to wait in the background. Now type bg and it will run in background. Now run the second command and press Ctrl-Z again. Type bg again and both programs will run in background.



    Now you can type jobs and it will print which commands are running in background. Type fg <job number> to put program in foreground again. If you omit the job number it will put the last job in the foreground. When the job is in foreground you can stop it with Ctrl-C. I don't know how you would stop both with one Ctrl-C.



    You can also add & at the end which puts it running in the background immediately without Ctrl-Z and bg. You can still bring it in foreground with fg.






    share|improve this answer





























      1














      & to the rescue. It launches the two processes in parallel.



      lsyncd lsyncd.lua & webpack --progress --color -w



      This will do the trick.



      Didn't read the kill part. A ctrl+C here would only terminate the second one. The process preceding the & runs in the background although it outputs on the stdout.



      The shortest way to terminate both processes is:
      1. Type Ctrl+C once. It kills the foreground process.
      2. Type fg and type Ctrl+C again. It brings the background process to foreground and kills it too.



      HTH!






      share|improve this answer























      • Derp. So simple. That looks to be doing exactly what I want. Thank you!
        – mpen
        Dec 17 '15 at 18:53










      • True. But you cannot stop the first process with Ctrl-C unless you bring it to the foreground.
        – nobody
        Dec 17 '15 at 18:53












      • @nobody actually you can stop the second one because it's running in foreground. Updated the answer.
        – Donbhupi
        Dec 17 '15 at 18:55










      • Oh poop. I want them both to die. Need to keep this simple so it's easy to start and stop for the linux noob.
        – mpen
        Dec 17 '15 at 18:55












      • @mpen can't think of an easy way to kill the process in background. Either use the jobs thing in the other answer or run ps -a in the shell, that will tell the pid that you can kill manually.
        – Donbhupi
        Dec 17 '15 at 18:57











      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "89"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f710609%2fhow-to-run-multiple-commands-in-parallel-and-see-output-from-both%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      Using parallel (in the moreutils package):



      parallel -j 2 -- 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


      Since the parallel process runs in the foreground, hitting CTRL+C will terminate all the processes running on top of it at once.





      • -j: Use to limit the number of jobs that are run at the same time;


      • --: separates the options from the commands.


      % parallel -j 2 -- 'while true; do echo foo; sleep 1; done' 'while true; do echo bar; sleep 1; done'
      bar
      foo
      bar
      foo
      bar
      foo
      ^C
      %





      share|improve this answer























      • Aha. That parallel seems to be different from than the parallel package (GNU?). This one seems to work! The other one just kept saying "parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.".
        – mpen
        Dec 18 '15 at 16:52
















      1














      Using parallel (in the moreutils package):



      parallel -j 2 -- 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


      Since the parallel process runs in the foreground, hitting CTRL+C will terminate all the processes running on top of it at once.





      • -j: Use to limit the number of jobs that are run at the same time;


      • --: separates the options from the commands.


      % parallel -j 2 -- 'while true; do echo foo; sleep 1; done' 'while true; do echo bar; sleep 1; done'
      bar
      foo
      bar
      foo
      bar
      foo
      ^C
      %





      share|improve this answer























      • Aha. That parallel seems to be different from than the parallel package (GNU?). This one seems to work! The other one just kept saying "parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.".
        – mpen
        Dec 18 '15 at 16:52














      1












      1








      1






      Using parallel (in the moreutils package):



      parallel -j 2 -- 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


      Since the parallel process runs in the foreground, hitting CTRL+C will terminate all the processes running on top of it at once.





      • -j: Use to limit the number of jobs that are run at the same time;


      • --: separates the options from the commands.


      % parallel -j 2 -- 'while true; do echo foo; sleep 1; done' 'while true; do echo bar; sleep 1; done'
      bar
      foo
      bar
      foo
      bar
      foo
      ^C
      %





      share|improve this answer














      Using parallel (in the moreutils package):



      parallel -j 2 -- 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


      Since the parallel process runs in the foreground, hitting CTRL+C will terminate all the processes running on top of it at once.





      • -j: Use to limit the number of jobs that are run at the same time;


      • --: separates the options from the commands.


      % parallel -j 2 -- 'while true; do echo foo; sleep 1; done' 'while true; do echo bar; sleep 1; done'
      bar
      foo
      bar
      foo
      bar
      foo
      ^C
      %






      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Dec 18 '15 at 5:42

























      answered Dec 18 '15 at 5:19









      kos

      25.2k869119




      25.2k869119












      • Aha. That parallel seems to be different from than the parallel package (GNU?). This one seems to work! The other one just kept saying "parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.".
        – mpen
        Dec 18 '15 at 16:52


















      • Aha. That parallel seems to be different from than the parallel package (GNU?). This one seems to work! The other one just kept saying "parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.".
        – mpen
        Dec 18 '15 at 16:52
















      Aha. That parallel seems to be different from than the parallel package (GNU?). This one seems to work! The other one just kept saying "parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.".
      – mpen
      Dec 18 '15 at 16:52




      Aha. That parallel seems to be different from than the parallel package (GNU?). This one seems to work! The other one just kept saying "parallel: Warning: Input is read from the terminal. Only experts do this on purpose. Press CTRL-D to exit.".
      – mpen
      Dec 18 '15 at 16:52













      2














      GNU Parallel defaults to postponing output until the job is finished. You can instead ask it to print output as soon there is a full line.



      parallel  --lb ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


      It avoids half-line mixing of the output:



      parallel -j0 --lb 'echo {};echo -n {};sleep {};echo {}' ::: 1 3 2 4


      Spend 20 minutes reading chapter 1+2 of GNU Parallel 2018 (online, printed). Your command line will love you for it.






      share|improve this answer




























        2














        GNU Parallel defaults to postponing output until the job is finished. You can instead ask it to print output as soon there is a full line.



        parallel  --lb ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


        It avoids half-line mixing of the output:



        parallel -j0 --lb 'echo {};echo -n {};sleep {};echo {}' ::: 1 3 2 4


        Spend 20 minutes reading chapter 1+2 of GNU Parallel 2018 (online, printed). Your command line will love you for it.






        share|improve this answer


























          2












          2








          2






          GNU Parallel defaults to postponing output until the job is finished. You can instead ask it to print output as soon there is a full line.



          parallel  --lb ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


          It avoids half-line mixing of the output:



          parallel -j0 --lb 'echo {};echo -n {};sleep {};echo {}' ::: 1 3 2 4


          Spend 20 minutes reading chapter 1+2 of GNU Parallel 2018 (online, printed). Your command line will love you for it.






          share|improve this answer














          GNU Parallel defaults to postponing output until the job is finished. You can instead ask it to print output as soon there is a full line.



          parallel  --lb ::: 'lsyncd lsyncd.lua' 'webpack --progress --color -w'


          It avoids half-line mixing of the output:



          parallel -j0 --lb 'echo {};echo -n {};sleep {};echo {}' ::: 1 3 2 4


          Spend 20 minutes reading chapter 1+2 of GNU Parallel 2018 (online, printed). Your command line will love you for it.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Dec 20 at 13:23

























          answered Dec 19 at 0:25









          Ole Tange

          1,0361820




          1,0361820























              1














              You have more options. Run the first command and press Ctrl-Z. This puts the command to wait in the background. Now type bg and it will run in background. Now run the second command and press Ctrl-Z again. Type bg again and both programs will run in background.



              Now you can type jobs and it will print which commands are running in background. Type fg <job number> to put program in foreground again. If you omit the job number it will put the last job in the foreground. When the job is in foreground you can stop it with Ctrl-C. I don't know how you would stop both with one Ctrl-C.



              You can also add & at the end which puts it running in the background immediately without Ctrl-Z and bg. You can still bring it in foreground with fg.






              share|improve this answer


























                1














                You have more options. Run the first command and press Ctrl-Z. This puts the command to wait in the background. Now type bg and it will run in background. Now run the second command and press Ctrl-Z again. Type bg again and both programs will run in background.



                Now you can type jobs and it will print which commands are running in background. Type fg <job number> to put program in foreground again. If you omit the job number it will put the last job in the foreground. When the job is in foreground you can stop it with Ctrl-C. I don't know how you would stop both with one Ctrl-C.



                You can also add & at the end which puts it running in the background immediately without Ctrl-Z and bg. You can still bring it in foreground with fg.






                share|improve this answer
























                  1












                  1








                  1






                  You have more options. Run the first command and press Ctrl-Z. This puts the command to wait in the background. Now type bg and it will run in background. Now run the second command and press Ctrl-Z again. Type bg again and both programs will run in background.



                  Now you can type jobs and it will print which commands are running in background. Type fg <job number> to put program in foreground again. If you omit the job number it will put the last job in the foreground. When the job is in foreground you can stop it with Ctrl-C. I don't know how you would stop both with one Ctrl-C.



                  You can also add & at the end which puts it running in the background immediately without Ctrl-Z and bg. You can still bring it in foreground with fg.






                  share|improve this answer












                  You have more options. Run the first command and press Ctrl-Z. This puts the command to wait in the background. Now type bg and it will run in background. Now run the second command and press Ctrl-Z again. Type bg again and both programs will run in background.



                  Now you can type jobs and it will print which commands are running in background. Type fg <job number> to put program in foreground again. If you omit the job number it will put the last job in the foreground. When the job is in foreground you can stop it with Ctrl-C. I don't know how you would stop both with one Ctrl-C.



                  You can also add & at the end which puts it running in the background immediately without Ctrl-Z and bg. You can still bring it in foreground with fg.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 17 '15 at 18:51









                  nobody

                  3,2621012




                  3,2621012























                      1














                      & to the rescue. It launches the two processes in parallel.



                      lsyncd lsyncd.lua & webpack --progress --color -w



                      This will do the trick.



                      Didn't read the kill part. A ctrl+C here would only terminate the second one. The process preceding the & runs in the background although it outputs on the stdout.



                      The shortest way to terminate both processes is:
                      1. Type Ctrl+C once. It kills the foreground process.
                      2. Type fg and type Ctrl+C again. It brings the background process to foreground and kills it too.



                      HTH!






                      share|improve this answer























                      • Derp. So simple. That looks to be doing exactly what I want. Thank you!
                        – mpen
                        Dec 17 '15 at 18:53










                      • True. But you cannot stop the first process with Ctrl-C unless you bring it to the foreground.
                        – nobody
                        Dec 17 '15 at 18:53












                      • @nobody actually you can stop the second one because it's running in foreground. Updated the answer.
                        – Donbhupi
                        Dec 17 '15 at 18:55










                      • Oh poop. I want them both to die. Need to keep this simple so it's easy to start and stop for the linux noob.
                        – mpen
                        Dec 17 '15 at 18:55












                      • @mpen can't think of an easy way to kill the process in background. Either use the jobs thing in the other answer or run ps -a in the shell, that will tell the pid that you can kill manually.
                        – Donbhupi
                        Dec 17 '15 at 18:57
















                      1














                      & to the rescue. It launches the two processes in parallel.



                      lsyncd lsyncd.lua & webpack --progress --color -w



                      This will do the trick.



                      Didn't read the kill part. A ctrl+C here would only terminate the second one. The process preceding the & runs in the background although it outputs on the stdout.



                      The shortest way to terminate both processes is:
                      1. Type Ctrl+C once. It kills the foreground process.
                      2. Type fg and type Ctrl+C again. It brings the background process to foreground and kills it too.



                      HTH!






                      share|improve this answer























                      • Derp. So simple. That looks to be doing exactly what I want. Thank you!
                        – mpen
                        Dec 17 '15 at 18:53










                      • True. But you cannot stop the first process with Ctrl-C unless you bring it to the foreground.
                        – nobody
                        Dec 17 '15 at 18:53












                      • @nobody actually you can stop the second one because it's running in foreground. Updated the answer.
                        – Donbhupi
                        Dec 17 '15 at 18:55










                      • Oh poop. I want them both to die. Need to keep this simple so it's easy to start and stop for the linux noob.
                        – mpen
                        Dec 17 '15 at 18:55












                      • @mpen can't think of an easy way to kill the process in background. Either use the jobs thing in the other answer or run ps -a in the shell, that will tell the pid that you can kill manually.
                        – Donbhupi
                        Dec 17 '15 at 18:57














                      1












                      1








                      1






                      & to the rescue. It launches the two processes in parallel.



                      lsyncd lsyncd.lua & webpack --progress --color -w



                      This will do the trick.



                      Didn't read the kill part. A ctrl+C here would only terminate the second one. The process preceding the & runs in the background although it outputs on the stdout.



                      The shortest way to terminate both processes is:
                      1. Type Ctrl+C once. It kills the foreground process.
                      2. Type fg and type Ctrl+C again. It brings the background process to foreground and kills it too.



                      HTH!






                      share|improve this answer














                      & to the rescue. It launches the two processes in parallel.



                      lsyncd lsyncd.lua & webpack --progress --color -w



                      This will do the trick.



                      Didn't read the kill part. A ctrl+C here would only terminate the second one. The process preceding the & runs in the background although it outputs on the stdout.



                      The shortest way to terminate both processes is:
                      1. Type Ctrl+C once. It kills the foreground process.
                      2. Type fg and type Ctrl+C again. It brings the background process to foreground and kills it too.



                      HTH!







                      share|improve this answer














                      share|improve this answer



                      share|improve this answer








                      edited Dec 17 '15 at 20:20

























                      answered Dec 17 '15 at 18:50









                      Donbhupi

                      1347




                      1347












                      • Derp. So simple. That looks to be doing exactly what I want. Thank you!
                        – mpen
                        Dec 17 '15 at 18:53










                      • True. But you cannot stop the first process with Ctrl-C unless you bring it to the foreground.
                        – nobody
                        Dec 17 '15 at 18:53












                      • @nobody actually you can stop the second one because it's running in foreground. Updated the answer.
                        – Donbhupi
                        Dec 17 '15 at 18:55










                      • Oh poop. I want them both to die. Need to keep this simple so it's easy to start and stop for the linux noob.
                        – mpen
                        Dec 17 '15 at 18:55












                      • @mpen can't think of an easy way to kill the process in background. Either use the jobs thing in the other answer or run ps -a in the shell, that will tell the pid that you can kill manually.
                        – Donbhupi
                        Dec 17 '15 at 18:57


















                      • Derp. So simple. That looks to be doing exactly what I want. Thank you!
                        – mpen
                        Dec 17 '15 at 18:53










                      • True. But you cannot stop the first process with Ctrl-C unless you bring it to the foreground.
                        – nobody
                        Dec 17 '15 at 18:53












                      • @nobody actually you can stop the second one because it's running in foreground. Updated the answer.
                        – Donbhupi
                        Dec 17 '15 at 18:55










                      • Oh poop. I want them both to die. Need to keep this simple so it's easy to start and stop for the linux noob.
                        – mpen
                        Dec 17 '15 at 18:55












                      • @mpen can't think of an easy way to kill the process in background. Either use the jobs thing in the other answer or run ps -a in the shell, that will tell the pid that you can kill manually.
                        – Donbhupi
                        Dec 17 '15 at 18:57
















                      Derp. So simple. That looks to be doing exactly what I want. Thank you!
                      – mpen
                      Dec 17 '15 at 18:53




                      Derp. So simple. That looks to be doing exactly what I want. Thank you!
                      – mpen
                      Dec 17 '15 at 18:53












                      True. But you cannot stop the first process with Ctrl-C unless you bring it to the foreground.
                      – nobody
                      Dec 17 '15 at 18:53






                      True. But you cannot stop the first process with Ctrl-C unless you bring it to the foreground.
                      – nobody
                      Dec 17 '15 at 18:53














                      @nobody actually you can stop the second one because it's running in foreground. Updated the answer.
                      – Donbhupi
                      Dec 17 '15 at 18:55




                      @nobody actually you can stop the second one because it's running in foreground. Updated the answer.
                      – Donbhupi
                      Dec 17 '15 at 18:55












                      Oh poop. I want them both to die. Need to keep this simple so it's easy to start and stop for the linux noob.
                      – mpen
                      Dec 17 '15 at 18:55






                      Oh poop. I want them both to die. Need to keep this simple so it's easy to start and stop for the linux noob.
                      – mpen
                      Dec 17 '15 at 18:55














                      @mpen can't think of an easy way to kill the process in background. Either use the jobs thing in the other answer or run ps -a in the shell, that will tell the pid that you can kill manually.
                      – Donbhupi
                      Dec 17 '15 at 18:57




                      @mpen can't think of an easy way to kill the process in background. Either use the jobs thing in the other answer or run ps -a in the shell, that will tell the pid that you can kill manually.
                      – Donbhupi
                      Dec 17 '15 at 18:57


















                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Ask Ubuntu!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f710609%2fhow-to-run-multiple-commands-in-parallel-and-see-output-from-both%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      How did Captain America manage to do this?

                      迪纳利

                      南乌拉尔铁路局