Forums: Linux Batch Question - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Linux Batch Question

#1 Guest_OleaSTeR_*

  • Group: Guests

Post icon  Posted 08 July 2005 - 02:02 PM

how transform this windows script in linux batch ???

FOR %%d in (
192.168.0.1
192.168.0.2
192.168.0.3
) do ping %%d
0

#2 User is offline   Blake 

  • Former Commander In Chief
  • Icon
  • Group: Retired General
  • Posts: 7,316
  • Joined: 24-September 02

Posted 08 July 2005 - 03:47 PM

This belongs in the beginners section.
0

#3 User is offline   myth 

  • Master Sergeant
  • Icon
  • Group: Members
  • Posts: 408
  • Joined: 09-January 04

Posted 08 July 2005 - 07:07 PM

Your looking at bash scripting for this:


#!/bin/bash
ipstart=1  # start IP
ipstop=254  # stop IP
while [ $ipstart -le $ipstop ]
do
        ping -q -c 1 192.168.13.$ipstart
        ipstart=$((ipstart+1))
done


Sorry, but couldnt figure out how to reduce the amount of information....

Btw, i used google to figure all that out - thought it maybe something nice to know... Not sure why you didnt try....
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

  • Share



Our Sponsors:


SwiftLayer Affiliate Web Hosting