How to run multiple commands in parallel and see output from both?
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
add a comment |
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
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
add a comment |
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
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
command-line
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
add a comment |
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
add a comment |
4 Answers
4
active
oldest
votes
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
%
Aha. Thatparallel
seems to be different from than theparallel
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
add a comment |
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.
add a comment |
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
.
add a comment |
&
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!
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 thejobs
thing in the other answer or runps -a
in the shell, that will tell the pid that you cankill
manually.
– Donbhupi
Dec 17 '15 at 18:57
|
show 4 more comments
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
%
Aha. Thatparallel
seems to be different from than theparallel
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
add a comment |
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
%
Aha. Thatparallel
seems to be different from than theparallel
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
add a comment |
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
%
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
%
edited Dec 18 '15 at 5:42
answered Dec 18 '15 at 5:19
kos
25.2k869119
25.2k869119
Aha. Thatparallel
seems to be different from than theparallel
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
add a comment |
Aha. Thatparallel
seems to be different from than theparallel
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Dec 20 at 13:23
answered Dec 19 at 0:25
Ole Tange
1,0361820
1,0361820
add a comment |
add a comment |
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
.
add a comment |
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
.
add a comment |
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
.
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
.
answered Dec 17 '15 at 18:51
nobody
3,2621012
3,2621012
add a comment |
add a comment |
&
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!
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 thejobs
thing in the other answer or runps -a
in the shell, that will tell the pid that you cankill
manually.
– Donbhupi
Dec 17 '15 at 18:57
|
show 4 more comments
&
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!
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 thejobs
thing in the other answer or runps -a
in the shell, that will tell the pid that you cankill
manually.
– Donbhupi
Dec 17 '15 at 18:57
|
show 4 more comments
&
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!
&
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!
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 thejobs
thing in the other answer or runps -a
in the shell, that will tell the pid that you cankill
manually.
– Donbhupi
Dec 17 '15 at 18:57
|
show 4 more comments
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 thejobs
thing in the other answer or runps -a
in the shell, that will tell the pid that you cankill
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
|
show 4 more comments
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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