User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Windows NT / 2000 / XP / 2003 section within the Tech Talk category of DaniWeb, a massive community of 425,996 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 1,681 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Windows NT / 2000 / XP / 2003 advertiser: Programming Forums
Views: 989 | Replies: 0
Reply
Join Date: Aug 2006
Location: Sacramento, CA
Posts: 2
Reputation: AlphaMouth is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
AlphaMouth AlphaMouth is offline Offline
Newbie Poster

Help with simple shell script

  #1  
Aug 16th, 2006
Trying to do a simple query of a list for thier IP's. The problem is the last echo of the variable (_IP) The parsing and seting of the variable seems to work fine Here's what I got:


for /F %%i in (ServerList.txt) do (
set _IP=

for /F "tokens=3" %%v in ('ping %%i -n 1 ^|find /i "Pinging" 2^>nul') do set _IP=%%v
echo "%%i","%_IP%"
)

I've tried setting the "%_IP%" variable to %%v, %v, %%_IP %_IP%, !_IP!, !%_IP%!

I'm stumped. This worked a while a go in a different enviroment. Is there something I'm missing here (to use the ! and echo variables)? Do I need to enable some sort of extensive command line interpreter? I've heard of such a thing before and used it, but didn't set it up.

Thanks guys!

P.S. 1st post here, so be gentle :lol:
Last edited by AlphaMouth : Aug 16th, 2006 at 3:33 pm.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Windows NT / 2000 / XP / 2003 Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Windows NT / 2000 / XP / 2003 Forum

All times are GMT -4. The time now is 12:12 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC