thomas wrote:
> Are you using standard shell scripting? Then I think it should be something 
> like:
> 
> 
> Code:
> 
> #!/bin/sh
> MYLINE=""
> while read LINE; do
>    # concatenate all read lines onto a single line
>    MYLINE="$MYLINE $LINE"
> done
> 
> # $MYLINE now contains the message, send this to the sms send function.
> 
> 
> 
> 
> my script is a bit more complex (it is infact a ruby script) but after you 
> have gathered the input then it should be pretty straight forward sending 
> this to the mobile.
> 
> You can test it by hand by running the script, CTRL-d will actually end the 
> input thus breaking the while loop and continueing.
> 
> Thomas


Hi Thomas, Thanks for the quick reply.  Yes, I am using a shell script called 
Zenoss2SMS.  Everything works except from the gathering the actual message 
part.  I keep getting empty SMS messages. 

I've also tried this : 
#!/bin/sh

MYLINE=""
EXTRA="Test"
while read LINE; do
   MYLINE="$MYLINE $LINE"
done
MYLINE="$MYLINE$EXTRA"

Then I did receive an sms only containing the word Test. So I assume the read 
LINE part dit not work.  My page command is 
"/home/zenoss/SMS/Zenoss2SMS $RECIPIENT"

Any ideas ? Am I missing something here ?




-------------------- m2f --------------------

Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=30919#30919

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to