Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I left work with a long running task running in the shell. For the sake of argument let's say I'm using 'wc -l' to count lines in a huge file. I'd like to get a notification when it is done, but I can't rely on email. I want to use curl to trigger an event on some online notification service, which I can then check for from home.

wc -l some_huge_file; curl

Are there any notification services out there that I could use with curl? I imagine that issuing a GET request to some resource, sets a flag that the job has completed, send an sms, email or whatever.

Any ideas for what to hit with that curl GET/POST/PUT/WHATEVER request?

share|improve this question
Can you be more specific? First you said that you cant rely on email, after you said "send an sms, email or whatever" – Marcelo Bittencourt Oct 26 '11 at 19:55
Marcelo: I realize that could be confusing. What I mean is that I'm not assuming sendmail to be installed/configured on the system where I'm running the task. The system that receives the GET request could have mail, sms etc features for notification. – Pimin Konstantin Kefaloukos Oct 27 '11 at 8:47
up vote 0 down vote accepted

I just notice that:

  • if you want to know your command executed successfully or not, check the exit status with $?.
  • Twitter no longer supports basic authentication. Take a look at Tweepy or Twurl.
share|improve this answer
I would +1 for both the status and pointing out the problem with basic auth, but I just started using serverfault (rating too low :-)). – Pimin Konstantin Kefaloukos Oct 27 '11 at 9:02
I'll look at Tweepy/Twurl and get back to you with a possible accepted answer :-) – Pimin Konstantin Kefaloukos Oct 27 '11 at 9:05

Does it have to be a service?

You can send an SMS message via sendmail.

You can use twitter

You can use Facebook

share|improve this answer
quanta is right. Trying the twit script gives: Basic authentication is not supported. – Pimin Konstantin Kefaloukos Oct 27 '11 at 9:00
I'm specifically not relying on anything but curl, so sendmail is not an option. I mean service in the broadest sense (anything that accepts a GET request), so twitter would have been good, if it worked. – Pimin Konstantin Kefaloukos Oct 27 '11 at 9:08

I made this simple bash script as a nagios check, to download a file using curl and verify if the contents MD5 matches a provided value...

You can easily modify it to your needs...

share|improve this answer
Thanks for the reply, and for sharing code, but I think you misunderstood my question. – Pimin Konstantin Kefaloukos Oct 27 '11 at 9:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.