I was playing around with Pushover, and had the thought that it would be cool if I could use it as an argument on any random command, so that it would run a pushover script at the end of the task, regardless of what that task was.
I have no idea if it's possible, or how I would go about it, but I'd like to learn.
This question on the RasPi Stack Exchange site is what got me thinking about it. But I think there are many things it would be useful for, like letting you know when that compile job is finally finished, and maybe if it was successful.
I had the thought that it could look something like:
$ apt-get -b source packagename -pushover "Compile job complete."
The thought being that the argument '-pushover [enter message text here]' after any command would execute the pushover script, and use their API to notify you via their app.
So I guess the question is, is it possible to do in this fashion? If so, where do I start? If not, are there better ways to accomplish the same thing, without being limited by what command you are running?
I'm not locked on the idea of using it as a command argument, but I do want a way to run it with any command, without writing a separate script for each one.
I am new to Linux, so if it is a non-starter idea, I'll take that answer, too, provided there are logical explanations of why it won't work to go with it.