aralık berlirterek
#!/bin/bashfor i in 192.168.0.{1..10}do ping -c 1 -t 1 "$i" >/dev/null 2>&1 && echo "Ping Status of $i : Success" || echo "Ping Status of $i : Failed"done
dosyadan okuyarakwhile read hostnamedoping -c 1 -t 1 "$hostname" > /dev/null 2>&1 && echo "Ping Status of $hostname : Success" || echo "Ping Status of $hostname : Failed" done < host.txt
Hiç yorum yok:
Yorum Gönder