![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bash Script to check Remote Host Connection | zulfikarmd | UNIX for Dummies Questions & Answers | 5 | 04-16-2008 07:53 AM |
| How to delete the files from local host to remote host | krishna176 | SUN Solaris | 3 | 03-24-2007 04:48 PM |
| disk discovery | fredao | SUN Solaris | 2 | 01-08-2007 01:51 PM |
| host alias not working: host not found | FunnyCats | UNIX for Advanced & Expert Users | 4 | 05-13-2005 05:36 PM |
| QNX host cannot ping SCO host, vice versa | gavon | IP Networking | 2 | 08-20-2001 09:57 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
host discovery using bash
I am trying to make a bash script to scan subnets to see what hosts are available. Is it correct that you can not make the ping command time out less than a second? The script below works, but can take up to 255 seconds which is a bit long
Is there a way to solve this using bash only?<code> subnet=192.168.2. addr=1 while [ $addr -lt 256 ]; do ping -c 1 -t 1 $subnet$addr > /dev/null && echo Found $subnet$addr let addr=addr+1 done </code> |
| Bookmarks |
| Tags |
| ping, ping port, port, port ping |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|