cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl with exec from a shell script

From: Harry Sufehmi <milis-ktr_at_harrysufehmi.com>
Date: Fri, 7 Feb 2003 15:06:41 -0000 (GMT Standard Time)

I'm trying to execute curl from a shell script (basically I got Big Brother
[bb4.com] installed, and I'd like it to notify me via SMS everytime there's
problem).

Running the script from command line works OK.
But when it's invoked by BB, it won't run.

The script itself does two things - send email, and send SMS (using curl).
The send-email bit always works, while send-SMS is having problem as I mentioned
above.

Below is the line that execute curl:

=================
exec /usr/local/bin/curl -x 10.90.193.209:8080 -d
"ACCOUNT=myaccount&PASSWORD=mypassword&NUMBER=mymobilephone&MESSAGE=$BBHOSTSVC-$BBCOLORLEVEL-$BBALPHAMSG&ORIGIN=bbserver&CMD=SENDMESSAGE"
http://smsgate.truesenses.com/cgi-bin/smsgateway.cgi > smsresult.txt
=================

I got the results from both tries, and they're different.

Calling script from command line results as follows:
  % Total % Received % Xferd Average Speed Time Curr.
                                 Dload Upload Total Current Left Speed
100 117 100 21 100 96 8 41 0:00:02 0:00:02 0:00:00 0

Script invoked by BB results as follows: (taken from BBOUT file)
  % Total % Received % Xferd Average Speed Time Curr.
                                 Dload Upload Total Current Left Speed
100 409 0 0 100 409 0 1007 0:00:00 0:00:00 0:00:00 0

To be frank, I'm not sure I understand why it (result from BB) is like that.
Total execution time shows zero, but yet it manages to upload 409 bytes...?

Everything here is on a Debian v30r1 box, and the shell is GNU bash, version
2.05a.0(1)-release.

Can anyone point me to the right direction please?
Many thanks in advance.

regards,
Harry

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-02-07