-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubnetping.sh
More file actions
39 lines (36 loc) · 793 Bytes
/
subnetping.sh
File metadata and controls
39 lines (36 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# ******************************************************************************************
# *
# * File: subnetping.sh
# *
# * Function: *****************
# *
# * Author: Luca Marzo
# *
# * Course: Sistemi Operativi I - Facoltà di Ingegneria - Università del Salento
# *
# * Copyright: CreativeCommons 2008 - Attribution-Noncommercial-Share Alike 2.5 Generic
# *
# * Notes:
# *
# * Change History:
# * ++++++++++++++ GMT+01:00 Prima stesura
# *
# ******************************************************************************************
#
# for ((a=1; a<255; a++))
# do
# if
# ping -q -o -t 1 10.0.12.$a
# then
# echo 10.0.12.$a
# fi
# done
for (( a=1; a<255; a++ ))
do
if
ping -o -t 1 10.0.12.$a > /dev/null
then
echo 10.0.12.$a 'è attivo'
fi
done