#!/bin/bash
#
# Written by Mike Studer a long time ago
# Make sure you obtain a nice submarine ping sound.
# ie., ping with an echo (sonar.au used here)

/usr/sbin/icmpinfo -vv | \
  /usr/bin/nawk '$4 == "ICMP_Echo"
                   {print $0;
                    system("/usr/bin/aplay -q /home/audio/ms/sonar_ping.wav")}'
# Released under GNU General Public License 3 by celeste:crystalfaery 2011-02-07 00:33:18+00:00
# http://www.crystalfaeries.net/linux/bin/sonar


syntax highlighted by Code2HTML, v. 0.9.1