From: Fredrik Kuivinen Date: Thu, 15 Dec 2005 19:55:28 GMT Subject: Re: [PATCH 5/11] git-applypatch: Usage string clean-up, emit usage string at incorrect invocation Message-ID: <20051215195528.GA14388@c165.ib.student.liu.se> In-Reply-To: <20051214144542.0a509e3e.tihirvon@gmail.com> On Wed, Dec 14, 2005 at 02:45:42PM +0200, Timo Hirvonen wrote: > On Tue, 13 Dec 2005 21:20:57 -0800 > Junio C Hamano wrote: > > > freku045@student.liu.se writes: > > > > > . git-sh-setup > > > > > > +[[ "$#" = "3" || "$#" = "4" ]] || usage > > > + > > > > I do not see much advantage to use [[...]] construct here. > > [[ ]] is bashishm. Does not work with ash. > > > test $# -ge 3 && test $# -le 4 || usage > > You don't need to quote $# because it is always defined (and always > non-negative integer). You can't unset or set it. Thanks. I guess this is what happens when you try to learn sh programming from the bash manpage. :) - Fredrik