Languages
[Edit]
EN

Bash - wait until sub-process or command is ended

6 points
Created by:
Pearl-Hurley
559

In this short article, we would like to show how to wait until some run sub-process or command is ended under Bash.

Quick solution:

Where:

  • & causes running some_command in the background, letting to get ran process PID by $!,
  • wait blocks current script during process is run.

Hint: you can change some_command to path to any program or script.

 

Alternative titles

  1. Bash - wait until sub-command is ended
  2. Bash - wait until subprocess or command is ended
  3. Bash - wait until subcommand is ended
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join