From owner-freebsd-hackers@FreeBSD.ORG Fri Apr 30 12:40:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2C72716A4CE for ; Fri, 30 Apr 2004 12:40:11 -0700 (PDT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 758C543D58 for ; Fri, 30 Apr 2004 12:40:10 -0700 (PDT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id D8F2B1FF9A6; Fri, 30 Apr 2004 21:40:08 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id D35551FF931; Fri, 30 Apr 2004 21:40:06 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 755D315615; Fri, 30 Apr 2004 19:31:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 720C415602; Fri, 30 Apr 2004 19:31:42 +0000 (UTC) Date: Fri, 30 Apr 2004 19:31:42 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: Martin Moeller In-Reply-To: <20040430142501.GA3036@tyr.systh.org> Message-ID: References: <20040430142501.GA3036@tyr.systh.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de cc: freebsd-hackers@freebsd.org Subject: Re: Accessing (the i4b) device driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Apr 2004 19:40:11 -0000 On Fri, 30 Apr 2004, Martin Moeller wrote: > I'm totally new to FreeBSD programming, so please forgive my troll-like > question! I'd like to write a nifty little program showing if somebody is > calling me via an ISDN line. In the far future, the program should show the > caller's telephone number. I am using this ince-quickly-hacked script with c4b and isdnd: tail -100f /var/log/isdnd.log | perl bin/parse-isdnd-log.pl --- cut --- #!/usr/bin/perl $|=1; while (<>) { s/^(\w+ \d+ \d+:\d+:\d+) \w+ \w+\[\d+\]/$1/; if (/CHD/) { s/CHD \d+ //; print $_; } } # End; --- cut --- Gives me s.th. like this: Apr 28 16:30:35: incoming call from NotAvailable to 41 ctrl 3 or Apr 28 17:23:30: incoming call from 01234567890 to 41 ctrl 3 -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/