By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,820 Members | 856 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,820 IT Pros & Developers. It's quick & easy.

Capturing output from a script to a variable

P: n/a
I have a device that came with a perl script that will control the
opening and closing of relays and also return their current state. I
have the script running as a server side include. The state is correctly
output in the document, but I need to base other code on the return
value. i.e.:

<!--#exec cmd="/lock/scripts/wps.perl localhost:80 user:password 2status"-->

will return either:
2 ON



How can I get this return value into a variable?


Feb 7 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
kurt wrote:
How can I get this return value into a variable?
The following might work:

var relayStatus ='<!--#exec cmd="...."-->';
Feb 7 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.