Shlomif's Technical Posts Community - Tech Tip: add a notification (or any other command) after a command-line task has ended [entries|archive|friends|userinfo]
Shlomif's Technical Posts Community

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Links
[Links:| Shlomi Fish's Homepage Main Journal Homesite Blog Planet Linux-IL Amir Aharoni in Unicode open dot dot dot ]

Tech Tip: add a notification (or any other command) after a command-line task has ended [Mar. 30th, 2014|06:33 pm]
Previous Entry Add to Memories Share Next Entry

shlomif_tech

[shlomif]
[Tags|, , , ]
[Current Location |Home]
[Current Mood |productive]
[Current Music |The White Panda - Bearly Legal]

I discovered that one can add a notification after a command you've already started running has ended on a UNIX system by suspending the command using “Ctrl + Z” and then typing something like “fg ; n --msg 'Command finished'” (where “n” is the command I use for notifications). “fg” brings a job to the foreground, and for more information about it see its wikipedia entry and the Unix Background Jobs entry on thegeekstuff.com.

Licence

You can reuse this entry under the Creative Commons Attribution 3.0 Unported licence, or at your option any later version. See the instructions of how to comply with it.

LinkReply