-   Linux - General (
-   -   Terminal Shutdown -h -P with a beep? (

Amdx2_x64 11-03-2010 12:34 AM

Terminal Shutdown -h -P with a beep?
I have a habit of watching videos when I go to sleep. So I decided to start using, for example, the following when I laid down:

sudo shutdown -h -P 60

Of course this shuts down the computer in an hour. I was wondering if there was a way I could get the computer to beep a few times for the last 10 Minutes and then a few more times for the last 5 minutes?

neonsignal 11-03-2010 02:21 AM

You could use a script (run in the background):

sleep 50m
printf '\a'; sleep 1; printf '\a'; sleep 1; printf '\a'
sleep 5m
printf '\a'; sleep 1; printf '\a'; sleep 1; printf '\a'
sleep 5m
sudo shutdown -h -P now

Amdx2_x64 11-03-2010 02:42 AM

Great. Thanks. I will give that a try tonight and let you know how it goes.

Amdx2_x64 11-03-2010 01:59 PM

Well I forgot to do this last night. However I did install the program beep. I forgot this and started falling asleep watching a movie and I did the sudo shutdown -h -P 120 Well the movie ended and the speakers where loud and it BEEPED. Good that it does it now, bad that I think they heard it several blocks away.

All times are GMT -5. The time now is 01:08 AM.