Date: Sat, 05 Jun 2010 23:40:21 -0500 From: CyberLeo Kitsana <cyberleo@cyberleo.net> To: Aiza <aiza21@comclark.com> Cc: "questions@freebsd.org" <questions@freebsd.org>, Dan Nelson <dnelson@allantgroup.com> Subject: Re: .sh & getopts Message-ID: <4C0B26B5.3090901@cyberleo.net> In-Reply-To: <4C0B1C61.9030501@comclark.com> References: <201006051513.o55FDCKj020952@mail.r-bonomi.com> <4C0ADBCF.8040506@comclark.com> <AANLkTimDVOQE-SrT7YO4UD3tktD81jy8px6dbbB83-Dl@mail.gmail.com> <20100606014737.GG85961@dan.emsphone.com> <4C0B1C61.9030501@comclark.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <CyberLeo@CyberLeo.Net> Furry Peace! - http://wwww.fur.com/peace/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C0B26B5.3090901>