Re: [PATCH 5/11] git-applypatch: Usage string clean-up, emit usage string at incorrect invocation
- From
Fredrik Kuivinen <freku045@student.liu.se>
- Date
- Dec 15, 2005, 19:55 UTC
- 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:
Show 19 quoted lines
> On Tue, 13 Dec 2005 21:20:57 -0800 > Junio C Hamano <junkio@cox.net> 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