cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-users Mailing List Archives

output placed into variable

From: Eric Gustafson <eric.gustafson_at_sps.lane.edu>
Date: Wed, 19 Mar 2008 13:03:39 -0700

I'm working on a vbscript that uses curl in a very simplistic form and
wish to have the output placed in a variable for use later on in my
script. Did I overlook how to do this in the docs?

Running the example below would yield a workstation name being output to
the console/screen. ie: EMC30884
I wish place the output into a variable (strWSNewName) and use it later
in my vbscript to rename the workstation.
Could someone point me in the right direction?

Example:
----8<--snip---
' using mac address, retrieve workstation name from database.
set macaddress=000f1f86563b
set url="http://hwaddr.intraweb/?hw_address="
url=url & macaddress
' final url would be http://hwaddr.intraweb/?hw_address=000f1f86563b
curl url
----8<--snip---

as executed in dos:
C:\Users\eric>set url=http://hwaddr.intraweb/?hw_address=000f1f86563b
C:\Users\eric>curl %url%
EMC30884
C:\Users\eric>

Thanks,
Eric

Note: The information contained in this message may be privileged and confidential
and protected from disclosure. If the reader of this message is not the intended recipient, or
an employee or agent responsible for delivering this message to the intended recipient, you
are hereby notified that any dissemination, distribution or copying of this communication is
strictly prohibited. If you have received this communication in error, please notify us
immediately by replying to the message and deleting it from your computer.

Thank you.
SPRINGFIELD SCHOOL DISTRICT 19
Received on 2008-03-19

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET