[mrtg] Re: [smokeping-users] Re: Help Required (SMS Script)

Syed Waqqas Ahmed s.waqqas at yahoo.com
Fri Dec 22 03:41:36 MET 2006

Thanx Marc but i m not passing is as an argument... 
  well i have managed it some how and its working now :)
  so thanx to all ... 
Marc Powell <marc at ena.com> wrote:

> -----Original Message-----
> From: smokeping-users-bounce at list.ee.ethz.ch [mailto:smokeping-users-
> bounce at list.ee.ethz.ch] On Behalf Of Syed Waqqas Ahmed
> Sent: Thursday, December 21, 2006 5:25 PM
> To: mrtg at list.ee.ethz.ch; smokeping-users at list.ee.ethz.ch
> Subject: [smokeping-users] Help Required (SMS Script)
> Dear All,
> Thanx for reply and concerns...just stuck in 1 last step.
> Can some 1 help me out with php and bash programming.. as i am able
> check the mail and compress it for sms using PHP script and wrote a
> program on bash to send the sms.... i m just wondering how to pass a
> stored in PHP variable or in to a bash script.
> i have to excute this final command
> echo | /usr/local/bin/gnokii --sendsms Number>
> Can some one help me out in this.. ??

If the value is passed to your script as a command line argument then
it's stored as $1 in bash. Excuse my pseudo-php below

$last_line = system('/path/to/yourscript $variable', $retval);

/path/to/yourscript --

echo $1 | /usr/local/bin/gnokii --sendsms 

If what you're passing includes spaces or special characters, enclose
"$variable" in quotes.


Unsubscribe mailto:smokeping-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:smokeping-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/smokeping-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi

 Send instant messages to your online friends http://uk.messenger.yahoo.com 

Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://lists.ee.ethz.ch/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the mrtg mailing list