cURL / Mailing Lists / curl-users / Single Mail


output placed into variable

From: Eric Gustafson <>
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?

' 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

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


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.
Received on 2008-03-19