Page 1 of 1
Urgent : sending sms
Posted: Sat Nov 08, 2014 4:00 am
by eddie25wm
I would like to send an sms that is in the variable. But i got no value when receiving the sms
code :
set var="http:\\google.com.sg/maps?"
echo "$var" | sudo gammu sendsms TEXT +65123456
please advise.
Thank you.
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 4:44 am
by eddie25wm
Hi,
Please help.
Thank you
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 7:34 am
by eddie25wm
Hi,
anyone know how?
Thanks
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 9:14 am
by jamesh
Your post has been up less than four hours. You might need to try a little patience....
Do the individual command works correctly from the command line?
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 9:15 am
by DougieLawson
eddie25wm wrote:I would like to send an sms that is in the variable. But i got no value when receiving the sms
Code: Select all
set var="http:\\google.com.sg/maps?"
echo "$var" | sudo gammu sendsms TEXT +65123456
please advise.
Thank you.
http://en.doc.centreon.com/HowToSendSMSWithGammu
Try changing your code to:
Code: Select all
set var="http://google.com.sg/maps?"
echo "$var" | gammu --sendsms TEXT +65123456
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 9:16 am
by DougieLawson
jamesh wrote:Your post has been up less than four hours. You might need to try a little patience....
Not just that, but in the middle of the night in the United Kingdom when we're all sleeping.
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 9:25 am
by rpdom
Try
Code: Select all
var="http://google.com.sg/maps?"
echo "$var" | gammu --sendsms TEXT +65123456
The "set" command is used for setting shell Options and Parameters, not Variables.
To set a variable you use the "variable=value" format.
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 10:42 am
by B.Goode
I wonder if that site is reliable? It differs from
what seems to be the 'home' site for the project, which gives the commands as arguments, not options.
The Hello World sample from the latter site is:
Code: Select all
echo "All your base are belong to us" | gammu sendsms TEXT 123456
Re: Urgent : sending sms
Posted: Sat Nov 08, 2014 11:25 am
by DougieLawson
In that case, pull the source code and see what it expects.