Skip to content
Advertisement

How to put an executable script on the background and wake it up after x minutes

I’m developing a timer in bash and this is what I’ve come up with so far:

JavaScript

It works like I was expecting except that I have to wait the X minutes I passed as input to get the prompt back.

Any ideas how I can execute this and have it execute it in the background so I can keep working with my terminal without waiting for script to finish?

Advertisement

Answer

Just add an & to the end of last line. That is:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement