Solved

Writing a script for ping command

Posted on 2000-04-13
5
308 Views
Last Modified: 2013-12-23
I need a script, which can be ping my terminals automaticaly, when I write on the screen only the terminals name.
At the sample
Terminal 1 = x.x.x.x
     .
     .
terminal n = y.y.y.y
(Becouse my IP adresses are confidential,you can write like these.
 
0
Comment
Question by:ayildirim
  • 3
5 Comments
 

Expert Comment

by:saile01
ID: 2715044
yours terminals have a static or dynamic ip address ?
0
 

Author Comment

by:ayildirim
ID: 2715316
static
0
 
LVL 3

Accepted Solution

by:
cbo120897 earned 100 total points
ID: 2715326
Try this batch:


---------------------------------------
@echo off
rem security ping
rem use: secping Tx
rem where Tx ist resolved to a IP-Adresse
rem ---------------------
rem the command who find the IP an make a ping
rem
for /f "tokens=1-2 delims= " %%a in ('type secping.bat ^| find "%1 " /I') do ping %%b
rem
rem ---------------------
rem
rem the database
rem
goto :END
T00 10.45.191.0
T01 10.45.191.1
T02 10.45.191.2
T03 10.45.191.3
T04 10.45.191.4
T05 10.45.191.5
T06 10.45.191.6
T07 10.45.191.7
T08 10.45.191.8
T09 10.45.191.9
T10 10.45.191.10
:END
---------------------------------------
In the batchfile you must define your terminals. But during the ping you can see the confidential addresses!

cbo

0
 
LVL 3

Expert Comment

by:cbo120897
ID: 2715331
Name the batch secure.bat and call ist like:

secping T09

cbo
0
 
LVL 3

Expert Comment

by:cbo120897
ID: 2715334
No, no name it secping.bat :-)
0

Featured Post

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Join & Write a Comment

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Resolve DNS query failed errors for Exchange
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now