From owner-freebsd-hackers@FreeBSD.ORG Tue May 13 01:07:53 2003 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 70CF437B401 for ; Tue, 13 May 2003 01:07:53 -0700 (PDT) Received: from mail1.psconsult.nl (mail1.psconsult.nl [213.222.19.243]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BC4743F75 for ; Tue, 13 May 2003 01:07:52 -0700 (PDT) (envelope-from paul@pop3.psconsult.nl) Received: from pop3.psconsult.nl (ps227.psconsult.nl [213.222.19.227]) by mail1.psconsult.nl (8.12.6p2/8.12.6) with ESMTP id h4D87mwU070749; Tue, 13 May 2003 10:07:49 +0200 (CEST) (envelope-from paul@pop3.psconsult.nl) Received: (from paul@localhost) by pop3.psconsult.nl (8.9.2/8.9.2) id KAA30650; Tue, 13 May 2003 10:07:48 +0200 (CEST) (envelope-from paul) Date: Tue, 13 May 2003 10:07:48 +0200 From: Paul Schenkeveld To: =?iso-8859-1?Q?Mikko_Ty=F6l=E4j=E4rvi?= Message-ID: <20030513100747.A30389@psconsult.nl> References: <1052346312.414067.669.nullmailer@cicuta.babolo.ru> <20030507205330.E310@atlas.home> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <20030507205330.E310@atlas.home>; from mbsd@pacbell.net on Wed, May 07, 2003 at 08:58:56PM -0700 cc: hackers@freebsd.org Subject: Re: Bridge config in /etc/rc (patch) 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: Tue, 13 May 2003 08:07:53 -0000 Hi All, On Wed, May 07, 2003 at 08:58:56PM -0700, Mikko Työläjärvi wrote: > On Thu, 8 May 2003 .@babolo.ru wrote: > > [...] > > > Interesting... IF new builtin command will be written, > > has it chance to be accepted? > > such as "list prefix" lists all sh variables with > > names prefix* ? > > You mean something like: > > list_prefix() { > eval "set | > while read v; do case \$v in $1*) echo \"\${v%%=*}\";; esac; done" > } Please be ware of the following: # rc.conf snippet static_routes="goodyear \ firestone \ bridgestone" route_goodyear="... " route_firestone="... " route_bridgestone="... " bridge_foo="... " bridge_bar="... " Now `list_prefix bridge` will also list bridgestone because multi-line variables will not be properly detected by list_prefix. > It forks an extra process, I know... > > $.02, > /Mikko $2e-2 Paul Schenkeveld