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 ... Regards S.waqqas Marc Powell <[EMAIL PROTECTED]> wrote:
> -----Original Message----- > From: [EMAIL PROTECTED] [mailto:smokeping-users- > [EMAIL PROTECTED] On Behalf Of Syed Waqqas Ahmed > Sent: Thursday, December 21, 2006 5:25 PM > To: [email protected]; [email protected] > 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 to > 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 value > 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 -- #!/bin/bash echo $1 | /usr/local/bin/gnokii --sendsms If what you're passing includes spaces or special characters, enclose "$variable" in quotes. http://www-128.ibm.com/developerworks/library/l-bash2.html -- Unsubscribe mailto:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] 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:[EMAIL PROTECTED] Help mailto:[EMAIL PROTECTED] Archive http://lists.ee.ethz.ch/smokeping-users WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
