I have the following problem:$ some_command &     # Adds a new job as a background process$ wait && echo Foo   # Blocks until some_command is finished$ wait && echo Foo & # Is started as a background job and is done immediatelyWhat I would like wait & to do is to wait in the background until all other background jobs are finished.Any way I can achieve that?
How do I wait for background jobs in the background?
bash;background process;jobs