The place I work at has commands that take a long time to execute.
Is there a command/utility that I can use to notify me when the command execution is over? It could be a popup window or maybe a little sound.
Generally, if you know this before running the command, you can just start it with:
This will execute the
If you care about a successful or failure exit, respectively use:
If the command has already started you may use job control to suspend it, then return it to the foreground with
Now … what you want to do after this depends on your environment.
If you use csh or tcsh as your interactive shell, you can use the
You can achieve a similar effect in bash with
This probably doesn't meet your requirements, since all it does is print a message; I dont' think it can be configured to pop up a window or ring the bell.
I have just begun using notifu for desktop notifications from Cygwin. It's a command line notification app for Windows.
I create a simple tool that does exactly this. https://github.com/vikfroberg/brb
For Linux, there is a nifty trick to do this automatically without having to type a command for notification every time.
First install autokey. This helps defining actions for different keystrokes.
Now, define a new phrase in autokey and assign the hotkey as Alt+Enter. Add this phrase:
Note that a new line after the first line is important.
Also, add a window filter. I use guake and terminal. Include whatever other terminal you use.
Now, everytime whenever you need to get notifications for a command, run it using Alt+Enter instead of Enter/Return.