From owner-freebsd-hackers@FreeBSD.ORG Tue Feb 9 23:05:50 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91F421065701 for ; Tue, 9 Feb 2010 23:05:50 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 55C0C8FC17 for ; Tue, 9 Feb 2010 23:05:50 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 834D21FFC22; Tue, 9 Feb 2010 23:05:49 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 566758449F; Wed, 10 Feb 2010 00:05:49 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Andrew Brampton References: Date: Wed, 10 Feb 2010 00:05:49 +0100 In-Reply-To: (Andrew Brampton's message of "Tue, 9 Feb 2010 21:08:22 +0000") Message-ID: <86tytqvwky.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.95 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl with regex? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Feb 2010 23:05:50 -0000 Andrew Brampton writes: > Today I was writing a script to read all the dev.cpu.?.temperature > sysctl OIDs. I was parsing them using a simple grep, but it occurred > to me it might be better if sysctl supported some form of regexp. You mean glob, not regexp... > For example instead of typing: > sysctl -a | grep dev.cpu.*.temperature > > I could write: > sysctl dev.cpu.*.temperature Sounds like a good idea. Shouldn't be too hard to implement either. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no