![](https://seccdn.libravatar.org/avatar/67a509132720e4ac7cfecfa51bae2fd4.jpg?s=120&d=mm&r=g)
On Tue, 30 Nov 1999, Wagner, Jan wrote:
Ich moechte ein Shellscript schreiben, was unterschiedlich auf die Antwort von Ping reagiert ..
Ungefaehr so:
#!/bin/bash #
if [ping blah (true)]; then (blockanweisung); else (blockanweisung); fi exit 0
Knackpunkt ist die Auswertung der Ping-Antwort. Koennte mir dabei jemand unter die Arme greifen?? Waere nicht schlecht .. Gruesse, Jan ich mach das so in einem script (bash):
case `ping -qnc5 ns.domain.irgendwo` in *`100% packet loss`*) echo "The server is down" exit 0 ;; esac hope this helps --- Michael Karges, mika@ins.at, kar@space.at Powered by Linux! Bye Billy boy! --------------------------------------------------------------------- To unsubscribe, e-mail: suse-linux-unsubscribe@suse.com For additional commands, e-mail: suse-linux-help@suse.com