Re: [PATCH 5/11] git-applypatch: Usage string clean-up, emit usage string at incorrect invocation
- From
- Timo Hirvonen <tihirvon@gmail.com>
- Date
- Dec 14, 2005, 12:45 UTC
- Message-ID
- <20051214144542.0a509e3e.tihirvon@gmail.com>
- In-Reply-To
- <7vfyow45l2.fsf@assigned-by-dhcp.cox.net>
On Tue, 13 Dec 2005 21:20:57 -0800 Junio C Hamano <junkio@cox.net> wrote:
Show 8 quoted lines
> 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.
-- http://onion.dynserv.net/~timo/