I have cmd2 that needs to follow after cmd1 completes. I need to pause cmd1 sometimes.
cmd2
cmd1
I type in
$ cmd1 &
Run it in a subshell:
(cmd1 && cmd2)
Example:
$ (sleep 5 && echo 1) # started the command chain ^Z [1]+ Stopped ( sleep 5 && echo 1 ) # stopped before `sleep 5` finished $ fg # resumed ( sleep 5 && echo 1 ) 1 # `sleep 5` finished and `echo 1` ran