From owner-freebsd-questions@FreeBSD.ORG Thu Jun 17 23:17:28 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CB0F16A4CE for ; Thu, 17 Jun 2004 23:17:28 +0000 (GMT) Received: from mail.revolutionsp.com (ganymede.revolutionsp.com [64.246.0.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id E616F43D49 for ; Thu, 17 Jun 2004 23:17:27 +0000 (GMT) (envelope-from klr@6s-gaming.com) Received: from mail.revolutionsp.com (localhost [127.0.0.1]) by mail.revolutionsp.com (Postfix) with ESMTP id 0627215CC6 for ; Thu, 17 Jun 2004 20:15:23 +0000 (GMT) Received: from 81.84.175.12 (SquirrelMail authenticated user klr@6s-gaming.com); by mailadmin.revolutionsp.com with HTTP; Thu, 17 Jun 2004 20:15:23 -0000 (GMT) Message-ID: <3502.81.84.175.12.1087503323.squirrel@81.84.175.12> Date: Thu, 17 Jun 2004 20:15:23 -0000 (GMT) From: klr@6s-gaming.com To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: need help on shell script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2004 23:17:28 -0000 Hi list, I read http://www.linuxgazette.com/node/view/9074 and tried to adopt this script to my ipfw firewall: #!/bin/sh tail -f /var/log/security | \ awk ' $0 ~ /ICMP/ { system("cat /root/sounds/icmp.wav > /dev/dsp "); } $0 ~ /TCP/ { system("cat /root/sounds/tcp.wav > /dev/dsp "); } $0 ~ /UDP/ { system("cat /root/sounds/udp.wav > /dev/dsp "); } ' This is what I got. However, sounds won't play one after another. e.g, if 3 packets are blocked at the same time, 2 TCP and one UDP, the system will always wait for a sound to finish before playing the next. I want it to be able to play the sounds in sequence (as fast as possible), but I couldn't figure a way out! Any shell script guru could give an helping hand? ;) Regards -- www.6s-gaming.com