How to know if a background job is finished?
If you want to fire off a background job, do some other stuff, then stop and wait for the background job to finish, you can do
nohup do_something & pid=$! ...more stuff... wait $pid
Alternatively, you can test for the job having exited like this:
nohup do_something & pid=$! ...more stuff... ps -p $pid > /dev/null [ $? == 1 ] && echo "it's gone, buddy!"