From owner-freebsd-questions@FreeBSD.ORG Fri Dec 9 22:12:27 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org 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 7837816A420 for ; Fri, 9 Dec 2005 22:12:27 +0000 (GMT) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (dc.cis.okstate.edu [139.78.100.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1615443D46 for ; Fri, 9 Dec 2005 22:12:27 +0000 (GMT) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (localhost.cis.okstate.edu [127.0.0.1]) by dc.cis.okstate.edu (8.12.6/8.12.6) with ESMTP id jB9MCQhn092277 for ; Fri, 9 Dec 2005 16:12:26 -0600 (CST) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <200512092212.jB9MCQhn092277@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org Date: Fri, 09 Dec 2005 16:12:26 -0600 From: Martin McCormick Subject: Regular Expression Trouble X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2005 22:12:27 -0000 After reading a bit about extended regular expressions and having a few actually work correctly in sed scripts, I tried one in egrep and it isn't working although there are no errors. I was hoping to get only the A records from a dns zone file so the expression I used is: egrep [[:space:]IN[:space:]A[:space:]] zone_file >h0 Had it worked, all that would have appeared in the h0 file was all the A or Address records. Instead, I get those plus almost everything else in the file. It is obviously not filtering correctly. Plain grep produces a 0-length output file so that is not too useful either. Putting double quotes around the RE didn't help either. It seems to match almost everything. Thanks for any good ideas. Martin McCormick WB5AGZ Stillwater, OK OSU Information Technology Department Network Operations Group .-- -... ..... .- --. --..