I have two background jobs with job id 1 and 2. I want to do something when job 1 is done, but I don't want to hang.
Currently what I get is
wait 1 && do whatever, but this command it self blocks current shell. I want to let
wait itself runs background. I tried
wait 1 & && do whateverin zsh but it doesn't work. I get an error :
zsh: parse error near '&&'.
Note: it's import that I want to wait in background rather than wait for some background jobs to be done.