Linux, Script

Linux Tasks Alert

When you start task which take long time to get completely finish.
If you want an alerted on completing your task.

Examples of long running tasks.
rsync  data copy from remote server.
Cpanel installation.
For this type of alerting you have to add a small script in your .bashrc file.

function linxalt { while ps -ao pid | grep -q " ${1}$"; do sleep 1 ; done;
 echo $'\a'; }

After that you have to find a pid of your long running process (like  2133) and on different linux terminal.

501$ linxalt 2133

It will shows you the a pleasant beep when the task finishes.