From owner-freebsd-bluetooth@FreeBSD.ORG Tue Nov 8 18:32:13 2005 Return-Path: X-Original-To: freebsd-bluetooth@freebsd.org Delivered-To: freebsd-bluetooth@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D925016A41F; Tue, 8 Nov 2005 18:32:13 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2CBA43D45; Tue, 8 Nov 2005 18:32:12 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id jA8IW4ME041059; Tue, 8 Nov 2005 21:32:05 +0300 (MSK) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id jA8IW4PL041058; Tue, 8 Nov 2005 21:32:04 +0300 (MSK) (envelope-from yar) Date: Tue, 8 Nov 2005 21:32:04 +0300 From: Yar Tikhiy To: Maksim Yevmenkin Message-ID: <20051108183203.GA40364@comp.chem.msu.su> References: <4367E346.4080106@savvis.net> <20051102111709.GD2465@comp.chem.msu.su> <20051102161311.GA8499@odin.ac.hmc.edu> <43690365.60909@savvis.net> <20051102190655.GA3961@odin.ac.hmc.edu> <436A6649.7000602@savvis.net> <20051103203217.GA30685@odin.ac.hmc.edu> <436BE02D.2020404@savvis.net> <20051105113503.GA13863@comp.chem.msu.su> <436F9C8B.1000300@savvis.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <436F9C8B.1000300@savvis.net> User-Agent: Mutt/1.5.9i Cc: freebsd-bluetooth@freebsd.org, Brooks Davis , freebsd-rc@freebsd.org Subject: Re: [RFC] rc.d integration for the bluetooth subsystem X-BeenThere: freebsd-bluetooth@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Using Bluetooth in FreeBSD environments List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2005 18:32:14 -0000 On Mon, Nov 07, 2005 at 10:27:23AM -0800, Maksim Yevmenkin wrote: > Yar Tikhiy wrote: > > if expr "$_line" : "[a-zA-Z0-9_]*=" > /dev/null 2>&1 ; then > ... > fi > > i do not really have any objection to this. since i already pass the > value through eval i might as well pass the entire line. And so the users will be able to use basic sh(1) tricks in the lines. > >And AFAIK stdin to a while loop can be redirected w/o enclosing > >the loop in braces. > > sure, but it looked more clear (to me anyway) this way :) Hmmm, I'm unsure if it worked at all ;-) In sh(1) you need to place a ';' before '}' if there is no '\n' after the last command in braces. That is, the sh(1) syntax dictates that you can write { command1; command2; } or { command1 command2 } but not { command1 command2 } In the last case '}' will be passed as an argument to command2 and shell will croak on brace mismatch. For some reason '}' behaves like a command itself in sh(1), unlike ')'. -- Yar