From owner-freebsd-questions@FreeBSD.ORG Sun Jun 6 04:40:24 2010 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB0981065670 for ; Sun, 6 Jun 2010 04:40:24 +0000 (UTC) (envelope-from cyberleo@cyberleo.net) Received: from paka.cyberleo.net (paka.cyberleo.net [66.219.31.21]) by mx1.freebsd.org (Postfix) with ESMTP id 915B58FC17 for ; Sun, 6 Jun 2010 04:40:24 +0000 (UTC) Received: from [172.16.44.4] (h-74-2-96-2.chcgilgm.static.covad.net [74.2.96.2]) by paka.cyberleo.net (Postfix) with ESMTPSA id 47AD628424; Sun, 6 Jun 2010 00:40:23 -0400 (EDT) Message-ID: <4C0B26B5.3090901@cyberleo.net> Date: Sat, 05 Jun 2010 23:40:21 -0500 From: CyberLeo Kitsana User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100508 Thunderbird/3.0.4 MIME-Version: 1.0 To: Aiza References: <201006051513.o55FDCKj020952@mail.r-bonomi.com> <4C0ADBCF.8040506@comclark.com> <20100606014737.GG85961@dan.emsphone.com> <4C0B1C61.9030501@comclark.com> In-Reply-To: <4C0B1C61.9030501@comclark.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Cc: "questions@freebsd.org" , Dan Nelson Subject: Re: .sh & getopts 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: Sun, 06 Jun 2010 04:40:24 -0000 On 06/05/2010 10:56 PM, Aiza wrote: > i) action="installworld"; $flag_count=$((flag_count+1));; > ... > What is still wrong here Bourne shell expands variables to their contents before evaluating. Thus, the above assignment ends up expanding to '0=1'. Leave out the $ on the target variable, and it becomes 'flag_count=1', which is more likely what you intended. The other syntax does make for some pretty nifty hacks, though. -- Fuzzy love, -CyberLeo Technical Administrator CyberLeo.Net Webhosting http://www.CyberLeo.Net Furry Peace! - http://wwww.fur.com/peace/