Script for notifying process termination

When I'm working, I usually have a lot of terminal open with different tasks running in different terminal. When I run a process that takes a long time(e.g. compiling, file prcoessing), I usually switch to another terminal. The annoying thing is that I need to constantly switch back to the terminal to check the progress of the process. Because of this, I wrote a script that monitors processes specified, and notify you when the process is finished via 'notify-send'.

Here is the script: pnotify

You will need  the 'libnotify' package from your distribution to provide the 'notify-send' command.
Usage: pnotify [-p PIDS] COMMAND ARGS

  -p PIDS, --pids=PIDS  pids to monitor, separated with comma.
  -h, --help            show this help message and exit

1. Monitor a command:
pnotify cp -r src dst
pnotify make -j8

2. Monitor a list of pids
pnotify -p 9527,123456
pnotify -p `pgrep cp`



嘸蝦米文翻譯機 網頁版

[教學] 在GMail 收台大Web Mail信件