Veritas-bu

Re: [Veritas-bu] More a Windows scripting question...but NBU related

2007-10-18 15:06:25
Subject: Re: [Veritas-bu] More a Windows scripting question...but NBU related
From: "Ellis, Jason" <Jason.Ellis AT imb DOT com>
To: Veritas-bu AT mailman.eng.auburn DOT edu
Date: Thu, 18 Oct 2007 11:49:41 -0700
Actually I want to do this (done in UNIX)...

varname=`command`

...in windows.

This runs 'command' and the resulting output of 'command' is stored in
varname.


 

Jason Ellis 
Technical Consultant  
IT Storage - Data Protection
Office: 714/520-3414 | Mobile: 714/889-8734 
Fax: 714/520-3470 
jason.ellis AT imb DOT com

Website: www.indymacbank.com
____________________________________________________________________
This message contains information which may be confidential and
privileged.
Unless you are the addressee (or authorized to receive for the
addressee),
you may not use, copy or disclose to anyone the message or any
information
contained in the message.  If you have received the message in error,
please
advise the sender by reply e-mail @imb.com, and delete the
message. Thank you.


-----Original Message-----
From: Martin, Jonathan [mailto:JMARTI05 AT intersil DOT com] 
Sent: Thursday, October 18, 2007 11:44 AM
To: Ellis, Jason; Veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] More a Windows scripting question...but NBU
related

Microsoft's Document
 
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs
/en-us/ntcmds_shelloverview.mspx?mfr=true
 
SET VARNAME=123
ECHO %VARNAME%
 
-Jonathan

________________________________

From: veritas-bu-bounces AT mailman.eng.auburn DOT edu on behalf of Ellis,
Jason
Sent: Thu 10/18/2007 2:21 PM
To: Veritas-bu AT mailman.eng.auburn DOT edu
Subject: [Veritas-bu] More a Windows scripting question...but NBU
related



So I need to run a command and then store the output of that command in
a variable for later use. In UNIX this is easy, just put the command
into back-quotes and place it in the variable you want the results to be
stored in. It doesn't work this was in the Windows shell.

 

Is there anybody out there who knows how to do this in Windows?

 

Thank you.

 

Jason



_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu