Got two commands cmd1 and cmd2. Of the two, cmd2 takes longer to finish. Need to run cmd2 and then cmd1.
Tried to run them in following way:
bash$ (nohup ./cmd2>result2 &) && nohup ./cmd1>result1 &
bash$ (nohup ./cmd2>result2 &) ; nohup ./cmd1>result1 &
But both time I can see cmd1 is not waiting for cmd2 to finish and result1 gets filled.
How to make cmd1 run after cmd2 when both should be nohup process and run in background?