I have a script running in background

./test.sh &

How can I know the completion of test.sh. I have to check the process id from an another console. Is there any another way

  • Why do you need to switch to another console to check? when it's running in background you still have command line if there is no process is running in foreground. also another command is jobs that was mentioned in now deleted answer! – αғsнιη Apr 9 at 3:43
  • Do you just want to know when it completes? The shell would usually inform you about completing background tasks. What's the issue you are having? – Kusalananda Apr 9 at 6:40
  • I need to know the completion to trigger execution of another program based on the output of this script. – kris Apr 9 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.