Hi,
I need to initiate a process script which will start and do some processing and then shuts down. Then i need to other verifications. But the the process takes around 25 to 3o minutes.
One thing i can monitor the nohup.out file for this process where i can wait for shutting down statement to appear.
I s there any other way i can code it ina better way
If you just started the process asynchronously, you could wait for it. In this case, however, it looks like you started it using nohup. Most implementations of nohup that I've seen spawn a process to run the specified utility, report if the child was not successfully started, and then exit. This means that the child process created is an orphan that can't be waited for by the shell that called nohup.
If you're sitting at a terminal doing other things while waiting for the child to complete, one frequent way to manually track the process of a nohup'ed process is to use: